Re: [PATCH] bootp arp corruption fix (was Re: 2.2.0 Bug summary)

Martin Mares (mj@ucw.cz)
Sun, 3 Jan 1999 13:34:14 +0100


Hello,

> My patch to reintroduce 2.0-alike 0.0.0.0 ip address behaviour happens
> to fix this. The main point is to allow bootpc/bootp setup scripts
> that work with 2.0 to work with 2.1, and as a side effect it
> simplifies the ip autoconfiguration via bootp code, fixing this bug.

I've not actually tried it, but after some minutes of gazing at the code
it seems to me that it it's just a coincidence it fixes this bug. The arp_rcv
function in net/ipv4/arp.c calls ip_route_input() and replies to the request
whenever rt_type is RTN_LOCAL. The routing table lookup ends up in
ip_route_input_slow() and gets accepted by the condition you added, but
rt_type is set according to res.type which is in this case _uninitialized_.

As Alexey has already said, handling BOOTP by adding special cases to
the IP route code is plain wrong and going to produce disastrous effects
like the `reply to all ARP packets' bug.

I've already rewritten the kernel IP autoconfiguration to send and receive
packets on its own and it already waits in DaveM's queue of networking patches.

Have a nice fortnight

-- 
Martin `MJ' Mares   <mj@ucw.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"Quote of the day: '"

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/