Re: 2.0.21 bootpd/arp related crash

A.N.Kuznetsov (kuznet@ms2.inr.ac.ru)
Tue, 1 Oct 1996 14:42:15 +0400 (MSD)


In article <m0v7wL6-00021tC@turbu> Steven Dick wrote:
: This Oops was triggered by bootpd in NetKit-B-0.06-13.i386.rpm.
: Upgrading to a newer bootpd seems to have fixed it.
: This looks like it might be another case of invalid args to a syscall,
: but that's just my uneducated guess.

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.