summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/devices')
-rw-r--r--src/vnet/devices/af_packet/af_packet.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vnet/devices/af_packet/af_packet.c b/src/vnet/devices/af_packet/af_packet.c
index 0508d3ec963..bfa28031c1c 100644
--- a/src/vnet/devices/af_packet/af_packet.c
+++ b/src/vnet/devices/af_packet/af_packet.c
@@ -189,6 +189,8 @@ create_packet_v2_sock (int host_if_index, tpacket_req_t * rx_req,
goto error;
}
+#if defined(PACKET_QDISC_BYPASS)
+ /* Introduced with Linux 3.14 so the ifdef should eventually be removed */
if (setsockopt (*fd, SOL_PACKET, PACKET_QDISC_BYPASS, &opt, sizeof (opt)) <
0)
{
@@ -197,6 +199,7 @@ create_packet_v2_sock (int host_if_index, tpacket_req_t * rx_req,
"handling option: %s (errno %d)",
strerror (errno), errno);
}
+#endif
if (setsockopt (*fd, SOL_PACKET, PACKET_RX_RING, rx_req, req_sz) < 0)
{