bootp packets from Mars (255.255.255.255) (patch included)

Ole Myren R|hne (o.m.rohne@fys.uio.no)
Wed, 4 Nov 1998 11:12:53 +0100 (CET)


I need bootpd to reply to bootp packets that contain all-ones in the
source address field. In 2.1.126, these packets are dropped as
martians in net/ipv4/route.c.

The following patch seems to solve the problem on my system. It just
moves a few lines. That seems quite innocent to me, but I don't know...

Ole

diff -u --recursive linux/net/ipv4/route.c linux-bootpd/net/ipv4/route.c
--- linux/net/ipv4/route.c Sun Oct 4 19:19:40 1998
+++ linux-bootpd/net/ipv4/route.c Wed Nov 4 10:25:10 1998
@@ -931,15 +931,15 @@

hash = rt_hash_code(daddr, saddr^(key.iif<<5), tos);

+ if (daddr == 0xFFFFFFFF || (saddr == 0 && daddr == 0))
+ goto brd_input;
+
/* Check for the most weird martians, which can be not detected
by fib_lookup.
*/

if (MULTICAST(saddr) || BADCLASS(saddr) || LOOPBACK(saddr))
goto martian_source;
-
- if (daddr == 0xFFFFFFFF || (saddr == 0 && daddr == 0))
- goto brd_input;

/* Accept zero addresses only to limited broadcast;
* I even do not know to fix it or not. Waiting for complains :-)

-
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/