ip_conntrack_count broken - kernel 2.6 - New patch
Subsystems (3)
Hi Harald,
The ip_conntrack_count is broken with kernel 2.6.8. This patch, which do the same thing, applies correctly.
thanks.
Signature · 2 lines
samir bellabes [email protected]
include/linux/sysctl.h +1 -0
@@ -410,6 +410,7 @@NET_IPV4_NF_CONNTRACK_ICMP_TIMEOUT =12 ,NET_IPV4_NF_CONNTRACK_GENERIC_TIMEOUT =13 ,NET_IPV4_NF_CONNTRACK_BUCKETS =14 , + NET_IPV4_NF_CONNTRACK_COUNT=15, };/* /proc/sys/net/ipv6 */
net/ipv4/netfilter/ip_conntrack_core.c +1 -1
@@ -65,7 +65,7 @@static LIST_HEAD (helpers);unsigned int ip_conntrack_htable_size =0 ;int ip_conntrack_max; -static atomic_t ip_conntrack_count =ATOMIC_INIT (0 ); +atomic_t ip_conntrack_count =ATOMIC_INIT (0 );struct list_head *ip_conntrack_hash;static kmem_cache_t *ip_conntrack_cachep;struct ip_conntrack ip_conntrack_untracked;
net/ipv4/netfilter/ip_conntrack_standalone.c +9 -0
@@ -312,6 +312,7 @@/* From ip_conntrack_core.c */ extern int ip_conntrack_max; +extern atomic_t ip_conntrack_count;extern unsigned int ip_conntrack_htable_size;/* From ip_conntrack_proto_tcp.c */
@@ -346,6 +347,14 @@ .proc_handler = &proc_dointvec, }, { + .ctl_name = NET_IPV4_NF_CONNTRACK_COUNT, + .procname = "ip_conntrack_count", + .data = &ip_conntrack_count, + .maxlen = sizeof(int), + .mode = 0444, + .proc_handler = &proc_dointvec, + }, + { .ctl_name = NET_IPV4_NF_CONNTRACK_BUCKETS, .procname = "ip_conntrack_buckets", .data = &ip_conntrack_htable_size,
Quoted 3 lines · Samir Bellabes
Hi Harald,
Theip_conntrack_countis broken with kernel 2.6.8. This patch, which do the same thing, applies correctly.
mh, at least with 2.6.8.1 it works:
laforge@tatooine%pts/2 (12:49) /usr/src/linux-2.6.8.1-test > patch -p1 --dry-run < ~/projects/cvs/netfilter/patch-o-matic-ng/ip_conntrack_count/linux-2.6.patch patching file net/ipv4/netfilter/ip_conntrack_core.c
Hunk #1 succeeded at 65 (offset 1 line).
patching file net/ipv4/netfilter/ip_conntrack_standalone.c
Hunk #1 succeeded at 312 (offset 1 line).
Hunk #2 succeeded at 347 (offset 1 line).
patching file include/linux/sysctl.h
Hunk #1 succeeded at 410 (offset 1 line).
Can you be more specific what the problem is? Also, apart from hunk reordering, I cannot see how your patch is different from what we have in cvs.
Quoted 1 line
thanks.
Signature · 5 lines
- Harald Welte <[email protected]> http://www.netfilter.org/ ============================================================================ "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie