1
0
mirror of https://code.semirocket.science/wrapsix synced 2024-12-04 19:51:02 +02:00

Disabling generic-receive-offload on startup

This commit is contained in:
xHire 2017-05-16 09:03:05 +02:00
parent 64907ebf5c
commit 148b644a70

View File

@ -1,6 +1,6 @@
/* /*
* WrapSix * WrapSix
* Copyright (C) 2008-2013 xHire <xhire@wrapsix.org> * Copyright (C) 2008-2017 xHire <xhire@wrapsix.org>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -118,13 +118,13 @@ int main(int argc, char **argv)
memcpy(&mac, &interface.ifr_hwaddr.sa_data, memcpy(&mac, &interface.ifr_hwaddr.sa_data,
sizeof(struct s_mac_addr)); sizeof(struct s_mac_addr));
/* disable generic segmentation offload */ /* disable generic receive offload */
ethtool.cmd = ETHTOOL_SGSO; ethtool.cmd = ETHTOOL_SGRO;
ethtool.data = 0; ethtool.data = 0;
interface.ifr_data = (caddr_t) &ethtool; interface.ifr_data = (caddr_t) &ethtool;
if (ioctl(sniff_sock, SIOCETHTOOL, &interface) == -1) { if (ioctl(sniff_sock, SIOCETHTOOL, &interface) == -1) {
log_error("Unable to disable generic segmentation " log_error("Unable to disable generic receive offload "
"offload on the interface"); "on the interface");
return 1; return 1;
} }