From: Guy Harris Date: Sun, 12 Jun 2011 02:34:26 +0000 (-0700) Subject: Handle kernels that don't have ETHTOOL_GFLAGS. X-Git-Tag: libpcap-1.2.1~46 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/cd8dcb0ca15fe41956d524a5b995f16e54c0466c Handle kernels that don't have ETHTOOL_GFLAGS. --- diff --git a/pcap-linux.c b/pcap-linux.c index d7950790..fa1d028d 100644 --- a/pcap-linux.c +++ b/pcap-linux.c @@ -4763,11 +4763,13 @@ iface_get_offload(pcap_t *handle) if (ret) return 1; /* generic segmentation offloading on */ +#ifdef ETHTOOL_GFLAGS ret = iface_ethtool_ioctl(handle, ETHTOOL_GFLAGS, "ETHTOOL_GFLAGS"); if (ret == -1) return -1; if (ret & ETH_FLAG_LRO) return 1; /* large receive offloading on */ +#endif #ifdef ETHTOOL_GGRO /*