af-packet: optionally disable offloading

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

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

Loading…
Cancel
Save