As reported by Dmitry Kunilov, at least some drivers return EINVAL
rather than EOPNOTSUPP for the SIOCETHTOOL ioctl, so check for both of
them.
Catch attempts to call pcap_compile() on a non-activated pcap_t
Fix crash on Linux with CAN-USB support without usbfs
Fix addition of VLAN tags for Linux cooked captures
Catch attempts to call pcap_compile() on a non-activated pcap_t
Fix crash on Linux with CAN-USB support without usbfs
Fix addition of VLAN tags for Linux cooked captures
+ Check for both EOPNOTSUPP and EINVAL after SIOCETHTOOL ioctl, so
+ that the driver can report either one if it doesn't support
+ SIOCETHTOOL
Summary for 1.3.0 libpcap release
Summary for 1.3.0 libpcap release
eval.cmd = cmd;
ifr.ifr_data = (caddr_t)&eval;
if (ioctl(handle->fd, SIOCETHTOOL, &ifr) == -1) {
eval.cmd = cmd;
ifr.ifr_data = (caddr_t)&eval;
if (ioctl(handle->fd, SIOCETHTOOL, &ifr) == -1) {
- if (errno == EOPNOTSUPP) {
+ if (errno == EOPNOTSUPP || errno == EINVAL) {
/*
* OK, let's just return 0, which, in our
* case, either means "no, what we're asking
/*
* OK, let's just return 0, which, in our
* case, either means "no, what we're asking