[PATCH] don't automatically drop packets from 0.0.0.0/8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For some reason linux drops all incoming packets which have a source
address in the 0.0.0.0/8 range, although these are valid addresses. The
attached patch fixes this. (It still drops packets coming from 0.0.0.0
since that's a special address.)

Signed-off-by: Amnon Aaronsohn <[email protected]>
---

--- linux-2.6.16.18/net/ipv4/route.c.old	2006-05-30 08:57:42.000000000 +0300
+++ linux-2.6.16.18/net/ipv4/route.c	2006-05-30 08:58:22.000000000 +0300
@@ -1935,7 +1935,7 @@ static int ip_route_input_slow(struct sk
 	/* Accept zero addresses only to limited broadcast;
 	 * I even do not know to fix it or not. Waiting for complains :-)
 	 */
-	if (ZERONET(saddr))
+	if (saddr == 0)
 		goto martian_source;

 	if (BADCLASS(daddr) || ZERONET(daddr) || LOOPBACK(daddr))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux