mirror of
https://code.semirocket.science/wrapsix
synced 2024-12-04 03:31:00 +02:00
Disabling generic-receive-offload on startup
This commit is contained in:
parent
64907ebf5c
commit
148b644a70
@ -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) ðtool;
|
interface.ifr_data = (caddr_t) ðtool;
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user