af-packet: optionally disable offloading

pull/2266/head
Victor Julien 9 years ago
parent 98092f63b5
commit 9d48720f9a

@ -453,10 +453,15 @@ finalize:
switch (ltype) { switch (ltype) {
case LINKTYPE_ETHERNET: case LINKTYPE_ETHERNET:
/* af-packet can handle csum offloading */ /* af-packet can handle csum offloading */
if (GetIfaceOffloading(iface, 0, 1) == 1) { if (LiveGetOffload() == 0) {
SCLogWarning(SC_ERR_AFP_CREATE, if (GetIfaceOffloading(iface, 0, 1) == 1) {
"Using AF_PACKET with offloading activated leads to capture problems"); SCLogWarning(SC_ERR_AFP_CREATE,
"Using AF_PACKET with offloading activated leads to capture problems");
}
} else {
DisableIfaceOffloading(iface, 0, 1);
} }
break;
case -1: case -1:
default: default:
break; break;

Loading…
Cancel
Save