Skip to content

Commit 474ff26

Browse files
zenczykowskidavem330
authored andcommitted
net-ethtool: ETHTOOL_GUFO did not and should not require CAP_NET_ADMIN
So it should not fail with EPERM even though it is no longer implemented... This is a fix for: (userns)$ egrep ^Cap /proc/self/status CapInh: 0000003fffffffff CapPrm: 0000003fffffffff CapEff: 0000003fffffffff CapBnd: 0000003fffffffff CapAmb: 0000003fffffffff (userns)$ tcpdump -i usb_rndis0 tcpdump: WARNING: usb_rndis0: SIOCETHTOOL(ETHTOOL_GUFO) ioctl failed: Operation not permitted Warning: Kernel filter failed: Bad file descriptor tcpdump: can't remove kernel filter: Bad file descriptor With this change it returns EOPNOTSUPP instead of EPERM. See also the-tcpdump-group/libpcap#689 Fixes: 08a00fe "net: Remove references to NETIF_F_UFO from ethtool." Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Maciej Żenczykowski <maze@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 8360ed6 commit 474ff26

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/core/ethtool.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2624,6 +2624,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)
26242624
case ETHTOOL_GPHYSTATS:
26252625
case ETHTOOL_GTSO:
26262626
case ETHTOOL_GPERMADDR:
2627+
case ETHTOOL_GUFO:
26272628
case ETHTOOL_GGSO:
26282629
case ETHTOOL_GGRO:
26292630
case ETHTOOL_GFLAGS:

0 commit comments

Comments
 (0)