diff options
author | Jouni Malinen <j@w1.fi> | 2020-04-19 13:36:47 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2020-04-19 14:42:41 (GMT) |
commit | 7a880b129de8f439324ab0c04a20417af022a29c (patch) | |
tree | 60ab3e80a54782ab19baa962b8fef8a234681323 /src/l2_packet/l2_packet_freebsd.c | |
parent | 95cbf450909abd4e45793c479d8e0d00618d3618 (diff) | |
download | hostap-7a880b129de8f439324ab0c04a20417af022a29c.zip hostap-7a880b129de8f439324ab0c04a20417af022a29c.tar.gz hostap-7a880b129de8f439324ab0c04a20417af022a29c.tar.bz2 |
l2_packet: Allow initialization without RX handling
This can be used to minimize resource use when receive path is not
needed.
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/l2_packet/l2_packet_freebsd.c')
-rw-r--r-- | src/l2_packet/l2_packet_freebsd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/l2_packet/l2_packet_freebsd.c b/src/l2_packet/l2_packet_freebsd.c index aa83648..60de9fe 100644 --- a/src/l2_packet/l2_packet_freebsd.c +++ b/src/l2_packet/l2_packet_freebsd.c @@ -84,7 +84,7 @@ static void l2_packet_receive(int sock, void *eloop_ctx, void *sock_ctx) packet = pcap_next(pcap, &hdr); - if (packet == NULL || hdr.caplen < sizeof(*ethhdr)) + if (!l2->rx_callback || !packet || hdr.caplen < sizeof(*ethhdr)) return; ethhdr = (struct l2_ethhdr *) packet; |