Commit 5ff0a7e6 authored by Maciej W. Rozycki's avatar Maciej W. Rozycki Committed by David S. Miller

[IPV4]: Permit the official ARP hw type in SIOCSARP for FDDI.

Signed-off-by; Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 66831c3a
...@@ -1005,8 +1005,26 @@ int arp_req_set(struct arpreq *r, struct net_device * dev) ...@@ -1005,8 +1005,26 @@ int arp_req_set(struct arpreq *r, struct net_device * dev)
if (!dev) if (!dev)
return -EINVAL; return -EINVAL;
} }
switch (dev->type) {
#ifdef CONFIG_FDDI
case ARPHRD_FDDI:
/*
* According to RFC 1390, FDDI devices should accept ARP
* hardware types of 1 (Ethernet). However, to be more
* robust, we'll accept hardware types of either 1 (Ethernet)
* or 6 (IEEE 802.2).
*/
if (r->arp_ha.sa_family != ARPHRD_FDDI &&
r->arp_ha.sa_family != ARPHRD_ETHER &&
r->arp_ha.sa_family != ARPHRD_IEEE802)
return -EINVAL;
break;
#endif
default:
if (r->arp_ha.sa_family != dev->type) if (r->arp_ha.sa_family != dev->type)
return -EINVAL; return -EINVAL;
break;
}
neigh = __neigh_lookup_errno(&arp_tbl, &ip, dev); neigh = __neigh_lookup_errno(&arp_tbl, &ip, dev);
err = PTR_ERR(neigh); err = PTR_ERR(neigh);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment