summaryrefslogtreecommitdiff
path: root/src/ipcpd/eth
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2018-10-12 17:44:36 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2018-10-12 17:44:36 +0200
commit36b89517affd96c9e323af9a4e6e88c8f0938caf (patch)
tree4a1f9ffc324c37bef728e1610a2fb91e78ae6122 /src/ipcpd/eth
parent1ee129f4479b1910afc929f24bb70b8bc6478f01 (diff)
parent3a650d07d2d7540ebee65cef58b35f0373ad14d6 (diff)
downloadouroboros-36b89517affd96c9e323af9a4e6e88c8f0938caf.tar.gz
ouroboros-36b89517affd96c9e323af9a4e6e88c8f0938caf.zip
Merge branch 'testing' into be
Diffstat (limited to 'src/ipcpd/eth')
-rw-r--r--src/ipcpd/eth/CMakeLists.txt2
-rw-r--r--src/ipcpd/eth/eth.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/src/ipcpd/eth/CMakeLists.txt b/src/ipcpd/eth/CMakeLists.txt
index 6672f93c..e4acdb7f 100644
--- a/src/ipcpd/eth/CMakeLists.txt
+++ b/src/ipcpd/eth/CMakeLists.txt
@@ -82,6 +82,8 @@ if (HAVE_ETH)
"Number of reader threads in Ethernet IPCP")
set(IPCP_ETH_WR_THR 3 CACHE STRING
"Number of writer threads in Ethernet IPCP")
+ set(IPCP_ETH_QDISC_BYPASS false CACHE BOOL
+ "Bypass the Qdisc in the kernel when using raw sockets")
set(ETH_LLC_SOURCES
# Add source files here
diff --git a/src/ipcpd/eth/eth.c b/src/ipcpd/eth/eth.c
index e7a1580c..3a749cf7 100644
--- a/src/ipcpd/eth/eth.c
+++ b/src/ipcpd/eth/eth.c
@@ -1231,7 +1231,9 @@ static int eth_ipcp_bootstrap(const struct ipcp_config * conf)
size_t maxsz;
#endif
#if defined(HAVE_RAW_SOCKETS)
+ #if defined(IPCP_ETH_QDISC_BYPASS)
int qdisc_bypass = 1;
+ #endif /* ENABLE_QDISC_BYPASS */
int flags;
#endif
assert(conf);
@@ -1415,10 +1417,12 @@ static int eth_ipcp_bootstrap(const struct ipcp_config * conf)
goto fail_device;
}
+ #if defined(IPCP_ETH_QDISC_BYPASS)
if (setsockopt(eth_data.s_fd, SOL_PACKET, PACKET_QDISC_BYPASS,
&qdisc_bypass, sizeof(qdisc_bypass))) {
log_info("Qdisc bypass not supported.");
}
+ #endif
if (bind(eth_data.s_fd, (struct sockaddr *) &eth_data.device,
sizeof(eth_data.device))) {