All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] don't try to track broadcasts or multicasts (4/4)
@ 2002-06-06 12:24 Martin Josefsson
  2002-06-08  7:35 ` Harald Welte
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Josefsson @ 2002-06-06 12:24 UTC (permalink / raw)
  To: Netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 469 bytes --]

There exists code to disable tracking of broadcasts but it's insice a
#if 0 / #endif in ip_conntrack_core.c and looks like some old debugging
code as it has printk's and stuff.

this patch removes that chunk and replaces it with a check so if the
packet is a broadcast or multicast we just return NF_ACCEPT since
there's not much point in us trying to track it.

-- 
/Martin

Never argue with an idiot. They drag you down to their level, then beat
you with experience.

[-- Attachment #2: ip_conntrack_core.c-broadmulti-diff --]
[-- Type: text/plain, Size: 1053 bytes --]

--- linux-2.4.19-pre9/net/ipv4/netfilter/ip_conntrack_core.c.orig	Mon Jun  3 20:32:28 2002
+++ linux-2.4.19-pre9/net/ipv4/netfilter/ip_conntrack_core.c	Tue Jun  4 20:56:18 2002
@@ -737,20 +737,9 @@
 	/* FIXME: Do this right please. --RR */
 	(*pskb)->nfcache |= NFC_UNKNOWN;
 
-/* Doesn't cover locally-generated broadcast, so not worth it. */
-#if 0
-	/* Ignore broadcast: no `connection'. */
-	if ((*pskb)->pkt_type == PACKET_BROADCAST) {
-		printk("Broadcast packet!\n");
+	/* Don't try to track broadcasts or multicasts. */
+	if ((*pskb)->pkt_type == PACKET_BROADCAST || (*pskb)->pkt_type == PACKET_MULTICAST)
 		return NF_ACCEPT;
-	} else if (((*pskb)->nh.iph->daddr & htonl(0x000000FF)) 
-		   == htonl(0x000000FF)) {
-		printk("Should bcast: %u.%u.%u.%u->%u.%u.%u.%u (sk=%p, ptype=%u)\n",
-		       NIPQUAD((*pskb)->nh.iph->saddr),
-		       NIPQUAD((*pskb)->nh.iph->daddr),
-		       (*pskb)->sk, (*pskb)->pkt_type);
-	}
-#endif
 
 	/* Previously seen (loopback)?  Ignore.  Do this before
            fragment check. */

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-06-09 19:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-06 12:24 [PATCH] don't try to track broadcasts or multicasts (4/4) Martin Josefsson
2002-06-08  7:35 ` Harald Welte
2002-06-08 14:51   ` Martin Josefsson
2002-06-09 17:18     ` Harald Welte
2002-06-09 19:35       ` Henrik Nordstrom

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.