Yes, it is bug. Fix:
if ((r->arp_flags & ATF_PERM) && !(r->arp_flags & ATF_COM))
return -EINVAL;
- if (ip_chk_addr(ip) && dev->type != ARPHRD_METRICOM)
+ if (ip_chk_addr(ip))
return -EINVAL;
if (!dev)
or another:
if ((r->arp_flags & ATF_PERM) && !(r->arp_flags & ATF_COM))
return -EINVAL;
- if (ip_chk_addr(ip) && dev->type != ARPHRD_METRICOM)
- return -EINVAL;
if (!dev)
{
struct rtable * rt;
rt = ip_rt_route(ip, 1);
if (!rt)
return -ENETUNREACH;
dev = rt->u.dst.dev;
ip_rt_put(rt);
}
if (!dev)
return -ENODEV;
+ if (ip_chk_addr(ip) && dev->type != ARPHRD_METRICOM)
+ return -EINVAL;
I believe that no device (even miraculous METRICOM 8) can have
ARP entries for own address, so that the first "fix" should be correct.
Alan, this funny METRICOM fix (and another one in arp_rcv) appeared
from one your fixes. Can you explain shortly, what the magic is?
Alexey Kuznetsov.