summaryrefslogtreecommitdiffstats
path: root/net/packet/af_packet.c
diff options
context:
space:
mode:
authorEric Dumazet2015-07-27 11:33:50 +0200
committerDavid S. Miller2015-07-29 08:41:24 +0200
commit11c91ef98f37cd743098de26160fffd7f9bd40e1 (patch)
treefbac25bfba3cd3487b659d37cf31d5d9d5c7070a /net/packet/af_packet.c
parentnet/ipv4: suppress NETDEV_UP notification on address lifetime update (diff)
downloadkernel-qcow2-linux-11c91ef98f37cd743098de26160fffd7f9bd40e1.tar.gz
kernel-qcow2-linux-11c91ef98f37cd743098de26160fffd7f9bd40e1.tar.xz
kernel-qcow2-linux-11c91ef98f37cd743098de26160fffd7f9bd40e1.zip
arp: filter NOARP neighbours for SIOCGARP
When arp is off on a device, and ioctl(SIOCGARP) is queried, a buggy answer is given with MAC address of the device, instead of the mac address of the destination/gateway. We filter out NUD_NOARP neighbours for /proc/net/arp, we must do the same for SIOCGARP ioctl. Tested: lpaa23:~# ./arp 10.246.7.190 MAC=00:01:e8:22:cb:1d // correct answer lpaa23:~# ip link set dev eth0 arp off lpaa23:~# cat /proc/net/arp # check arp table is now 'empty' IP address HW type Flags HW address Mask Device lpaa23:~# ./arp 10.246.7.190 MAC=00:1a:11:c3:0d:7f // buggy answer before patch (this is eth0 mac) After patch : lpaa23:~# ip link set dev eth0 arp off lpaa23:~# ./arp 10.246.7.190 ioctl(SIOCGARP) failed: No such device or address Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Vytautas Valancius <valas@google.com> Cc: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/packet/af_packet.c')
0 files changed, 0 insertions, 0 deletions