Skip to contentSkip to conversation

possible arp table corruption [2.4.18]

DISCUSSION Carsten Otto 2 participants 2 messages Jul 6, 2004 – Jul 7, 2004

lore
Share & tools
lore
#0 lore raw

I switched to read("/proc/net/arp") in my script and basically have no difference.
Today I found following "nice" bug:

134.130.48.70    0x1         0x2         00:E0:98:AD:01:97     *        eth0
134.130.48.157   0x1         0x2         00:10:4B:4D:01:97     *        eth0
134.130.48.157   0x1         0x2         00:10:4B:45:86:6C     *        eth0

These three entries appeared near the end of the output and had no lines between them. Notice how the second MAC is composed from the other two. The first and last entry is correct. If my database and script etc. work correct, this (wrong) second combination occured at least five times, but only one of them showed up today.

Where is the bug? What should I do to avoid this?

Thanks,

Signature · 3 lines
Carsten Otto
[email protected]
http://c-otto.de
#1 lore raw
Quoted 1 line · In article <[email protected]> you wrote:

Where is the bug? What should I do to avoid this?

Probably in the line generation code of the /proc file in (your old) kernel, and you can (still) avoid it with netlink. Or you need to read multiple times through the table.

Another option would be to use a user space arp daemon to catch changes of the table.

Greetings
Bernd

Signature · 2 lines
eckes privat - http://www.eckes.org/
Project Freefire - http://www.freefire.org/