diff options
Diffstat (limited to 'netsniff-ng.c')
-rw-r--r-- | netsniff-ng.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/netsniff-ng.c b/netsniff-ng.c index 88c48fb..78b5666 100644 --- a/netsniff-ng.c +++ b/netsniff-ng.c @@ -878,9 +878,6 @@ static void recv_only_or_dump(struct ctx *ctx) struct sock_fprog bpf_ops; struct timeval start, end, diff; unsigned long frame_count = 0; -#ifdef HAVE_TPACKET3 - struct block_desc *pbd; -#endif sock = pf_socket(); @@ -952,6 +949,8 @@ static void recv_only_or_dump(struct ctx *ctx) while (likely(sigint == 0)) { #ifdef HAVE_TPACKET3 + struct block_desc *pbd; + while (user_may_pull_from_rx_block((pbd = rx_ring.frames[it].iov_base))) { walk_t3_block(pbd, ctx, sock, &fd, &frame_count); |