Skip to contentSkip to conversation

problem with connlimit module compile

DISCUSSION Keith 3 participants 4 messages Sep 1, 2005 netfilter

lore
Share & tools
lore

Keith

author
#0 lore raw

I'm using kernel 2.6.13 and iptables 1.3.2 and
patch-o-matic ng-20040621

I'm getting an error when I try to patch and compile to use connlimit from the patch-o-matic base. the errors look like this:

In function count_them:
struct ip_conntrack_tuple_hash has no member named ctrack

And sure enough I find the ctrack pointer was removed here:
http://lists.netfilter.org/pipermail/netfilter-devel/2005-January/018147.htm
l

I started digging into the source and find it non-trivial Any suggestions on a work around?

#1 lore raw

You are going to want to go with a much newer version of POM for the connlimit module, I have only tested the latest version with 2.6.11.X, but AFAIK it would work on later versions as well.

Good luck

-Damon-

Quoted 22 lines · Keith

I'm using kernel 2.6.13 and iptables 1.3.2 and
patch-o-matic ng-20040621

I'm getting an error when I try to patch and compile to use connlimit from the patch-o-matic base. the errors look like this:

In function count_them:
struct ip_conntrack_tuple_hash has no member named ctrack

And sure enough I find the ctrack pointer was removed here:
http://lists.netfilter.org/pipermail/netfilter-devel/2005-January/018147.htm
l

I started digging into the source and find it non-trivial Any suggestions on a work around?

#2 lore raw

ip_conntrack_get doesn't call nf_conntrack_get(&ct->ct_general)

In reply to Keith

Until I looked more closely I always assumed ip_conntrack_get was doing the proper reference counting, and I would always call ip_conntrack_put for everything I was "getting". The problem is that ip_conntrack_put calls nf_conntrack_put(&ct->ct_general) but ip_conntrack_get *does not* call nf_conntrack_get(&ct->ct_general). Problem? If so I would be happy to send a patch.

Thanks

-Damon-

#3 lore raw

Re: ip_conntrack_get doesn't call nf_conntrack_get(&ct->ct_general)

Quoted 7 lines · Damon Gray

Until I looked more closely I always assumed ip_conntrack_get was doing the proper reference counting, and I would always call ip_conntrack_put for everything I was "getting". The problem is that ip_conntrack_put calls nf_conntrack_put(&ct->ct_general) but ip_conntrack_get *does not* call nf_conntrack_get(&ct->ct_general). Problem? If so I would be happy to send a patch.

This is one of the uglies of ip_conntrack. ip_conntrack_get just returns the nfct pointer from the skb and the nfctinfo field in *ctinfo, without increasing the refcnt, refcounting is done using nf_conntrack_get. Before nfctinfo was introduced, ctinfo it had to be derived from the nfct pointer, which is why ip_conntrack_get exists. Cleanup patches in this area would be very welcome, but it should be done for nf_conntrack, which copied this part of ip_conntrack.