diff --git a/userland/lib/pfring.c b/userland/lib/pfring.c index 8f863021d..7239ce78b 100644 --- a/userland/lib/pfring.c +++ b/userland/lib/pfring.c @@ -1391,11 +1391,10 @@ int pfring_send_last_rx_packet(pfring *ring, int tx_interface_id) { We can't send the last packet with multithread as the concept of "last" does not apply here having threads that compete for packets */ - if(unlikely(ring->reentrant || (!ring->long_header))) - return(PF_RING_ERROR_NOT_SUPPORTED); - if(ring && ring->send_last_rx_packet) + if(ring && ring->send_last_rx_packet) { return(ring->send_last_rx_packet(ring, tx_interface_id)); + } return(PF_RING_ERROR_NOT_SUPPORTED); } diff --git a/userland/lib/pfring_mod.c b/userland/lib/pfring_mod.c index e3441a823..e0252d2c0 100644 --- a/userland/lib/pfring_mod.c +++ b/userland/lib/pfring_mod.c @@ -1035,6 +1035,9 @@ int pfring_mod_send_last_rx_packet(pfring *ring, int tx_interface_id) { if(!ring->tx.enabled_rx_packet_send) return(PF_RING_ERROR_WRONG_CONFIGURATION); + if(unlikely(ring->reentrant || (!ring->long_header))) + return(PF_RING_ERROR_NOT_SUPPORTED); + if(ring->tx.last_received_hdr == NULL) return(PF_RING_ERROR_NO_PKT_AVAILABLE); /* We have not yet read a single packet */