Re: bug in /proc/net/arp?

A.N.Kuznetsov (inr-linux-kernel@ms2.inr.ac.ru)
Thu, 22 Feb 1996 15:14:52 +0300 (MSK)


> If you delete an ARP entry with "arp -d x.x.x.x", it doesnt show up
> in /proc/net/arp, even if there is active IP traffic to that host.
>
> The entry recovers after a timeout of a few 10s of seconds.
>

You are right, it is bug.
Please add the line ifdef'ed by NO_ANK_FIX in arp.c.

static void arp_free_entry(struct arp_table *entry)
{
unsigned long flags;
struct hh_cache *hh, *next;

del_timer(&entry->timer);

save_flags(flags);
cli();
arp_release_entry(entry);

for (hh = entry->hh; hh; hh = next)
{
next = hh->hh_next;
hh->hh_arp = NULL;
#ifndef NO_ANK_FIX
hh->hh_uptodate = 0;
#endif
if (!--hh->hh_refcnt)
kfree_s(hh, sizeof(struct(struct hh_cache)));
}
restore_flags(flags);

kfree_s(entry, sizeof(struct arp_table));
return;
}

Alexey Kuznetsov.