ipt_REJECT shouldn't send replies for wrong udp csum
Subsystems (2)
PATCH 1/1 ipt_REJECT shouldn't send replies for wrong udp csum
Hi Dave!
This is another patch of the series of patches you will receive from me today.
Please apply to 2.4.x and 2.5.x, thanks.
Author: Jozsef Kadlecsik <[email protected]>
As 2.4.20 came out with newnat included, there were several reports on excessive logging of reused FTP expectations.
The patch fixes the problem by separating the two possible cases:
when the conntrack helper is registered with the reuse flag enabled, then the logging is converted to debugging (not enabled by default), otherwise the logging is kept to notify the admin on the violation of the given protocol.
net/ipv4/netfilter/ip_conntrack_core.c +17 -12
@@ -966,23 +966,28 @@ related_to->expecting >= related_to->helper->max_expected) {struct list_head *cur_item;/* old == NULL */ -if (net_ratelimit ()) -printk (KERN_WARNING -"ip_conntrack: max number of expected " -"connections %i of %s reached for " -"%u.%u.%u.%u->%u.%u.%u.%u%s\n" , - related_to->helper->max_expected, - related_to->helper->name, -NIPQUAD (related_to->tuplehash[IP_CT_DIR_ORIGINAL ].tuple.src.ip), -NIPQUAD (related_to->tuplehash[IP_CT_DIR_ORIGINAL ].tuple.dst.ip), - related_to->helper->flags &IP_CT_HELPER_F_REUSE_EXPECT ? -", reusing" :"" );if (!(related_to->helper->flags &IP_CT_HELPER_F_REUSE_EXPECT )) {WRITE_UNLOCK (&ip_conntrack_lock); +if (net_ratelimit ()) +printk (KERN_WARNING +"ip_conntrack: max number of expected " +"connections %i of %s reached for " +"%u.%u.%u.%u->%u.%u.%u.%u\n" , + related_to->helper->max_expected, + related_to->helper->name, +NIPQUAD (related_to->tuplehash[IP_CT_DIR_ORIGINAL ].tuple.src.ip), +NIPQUAD (related_to->tuplehash[IP_CT_DIR_ORIGINAL ].tuple.dst.ip));return -EPERM ; } - +DEBUGP ("ip_conntrack: max number of expected " +"connections %i of %s reached for " +"%u.%u.%u.%u->%u.%u.%u.%u, reusing\n" , + related_to->helper->max_expected, + related_to->helper->name, +NIPQUAD (related_to->tuplehash[IP_CT_DIR_ORIGINAL ].tuple.src.ip), +NIPQUAD (related_to->tuplehash[IP_CT_DIR_ORIGINAL ].tuple.dst.ip)); +/* choose the the oldest expectation to evict */ list_for_each (cur_item, &related_to->sibling_list) {struct ip_conntrack_expect *cur;
Signature · 4 lines
- Harald Welte / [email protected] http://www.gnumonks.org/ ============================================================================ "If this were a dictatorship, it'd be a heck of a lot easier, just so long as I'm the dictator." -- George W. Bush Dec 18, 2000
David S. Miller
Applied From: Harald Welte <[email protected]>
Date: Thu, 9 Jan 2003 15:47:50 +0100
Please apply to 2.4.x and 2.5.x, thanks.
Author: Jozsef Kadlecsik <[email protected]>
As 2.4.20 came out with newnat included, there were several reports on excessive logging of reused FTP expectations.
Applied, but watch those subject lines :-)