netfilter 02/02: xt_connlimit: fix regression caused by zero family value
Subsystems (3)
commit 0b3645af59740e4da29a18b96d8eaf68ddd2cea4
Author: Jan Engelhardt <[email protected]> Date: Thu Nov 5 15:02:25 2009 +0100
netfilter: xt_connlimit: fix regression caused by zero family value
Commit v2.6.28-rc1~7172~1092~2 was slightly incomplete; not all instances of par->match->family were changed to par->family.
Netfilter bugzilla #610.
net/netfilter/xt_connlimit.c +4 -6
@@ -103,7 +103,7 @@ static int count_them(struct xt_connlimit_data *data,const struct nf_conntrack_tuple *tuple, const union nf_inet_addr *addr, const union nf_inet_addr *mask, - const struct xt_match *match) + u_int8_t family) { const struct nf_conntrack_tuple_hash *found;struct xt_connlimit_conn *conn;
@@ -113,8 +113,7 @@ static int count_them(struct xt_connlimit_data *data,bool addit = true;int matches =0 ; - -if (match->family ==NFPROTO_IPV6 ) +if (family ==NFPROTO_IPV6 ) hash = &data->iphash[connlimit_iphash6 (addr, mask)];else hash = &data->iphash[connlimit_iphash (addr->ip & mask->ip)];
@@ -157,8 +156,7 @@ static int count_them(struct xt_connlimit_data *data,continue ; } -if (same_source_net (addr, mask, &conn->tuple.src.u3, - match->family)) +if (same_source_net (addr, mask, &conn->tuple.src.u3, family))/* same source network -> be counted! */ ++matches;nf_ct_put (found_ct);
@@ -207,7 +205,7 @@ connlimit_mt(const struct sk_buff *skb, const struct xt_match_param *par)spin_lock_bh (&info->data->lock); connections =count_them (info->data, tuple_ptr, &addr, - &info->mask, par->match); + &info->mask, par->family);spin_unlock_bh (&info->data->lock);if (connections <0 ) {
Quoted 7 lines · Patrick McHardy
netfilter:
xt_connlimit: fix regression caused by zero family valueCommit v2.6.28-rc1~7172~1092~2 was slightly incomplete; not all instances of
par->match->familywere changed topar->family.Netfilter bugzilla #610.
Hold it.
git would never output ~7172~1092~2 because ~8266 would be much simpler.
I originally wrote "Commit v2.6.28-rc1~717^2~109^2~2", but one of your programs seems to eat commit messages or more.
(BTW, are not inline patches preferred for reply? Attachments do not automatically get quoted and I have to export it, reimport it, and have it filtered through perl to add a >.)
David Miller
maintainerFrom: Jan Engelhardt <[email protected]>
Date: Thu, 5 Nov 2009 19:45:25 +0100 (CET)
Quoted 7 lines · Patrick McHardy
Quoted 6 lines
netfilter:
xt_connlimit: fix regression caused by zero family valueCommit v2.6.28-rc1~7172~1092~2 was slightly incomplete; not all instances of
par->match->familywere changed topar->family.
Quoted 7 lines
Quoted 1 line
Netfilter bugzilla #610.
Hold it.
git would never output ~7172~1092~2 because ~8266 would be much simpler.I originally wrote "Commit v2.6.28-rc1~717^2~109^2~2", but one of your programs seems to eat commit messages or more.
Guys, please sort this out so I can add this fix to net-2.6
Thanks.
Quoted 15 lines · David Miller
From: Jan Engelhardt <[email protected]>
Date: Thu, 5 Nov 2009 19:45:25 +0100 (CET)Quoted 12 lines · Patrick McHardy
Quoted 7 lines
netfilter:
xt_connlimit: fix regression caused by zero family valueCommit v2.6.28-rc1~7172~1092~2 was slightly incomplete; not all instances of
par->match->familywere changed topar->family.Netfilter bugzilla #610.
Hold it.
git would never output ~7172~1092~2 because ~8266 would be much simpler.
Quoted 6 lines
Quoted 2 lines
I originally wrote "Commit v2.6.28-rc1~717^2~109^2~2", but one of your programs seems to eat commit messages or more.
Guys, please sort this out so I can add this fix to net-2.6
Thanks.
This should.
commit ffffffffffffffffffffffffffffffffffffffff
Author: Jan Engelhardt <[email protected]> Date: Wed Nov 4 14:27:30 2009 +0100
netfilter: xt_connlimit: fix regression caused by zero family value Commit v2.6.28-rc1~717^2~109^2~2 was slightly incomplete; not all instances of par->match->family were changed to par->family.
References: http://bugzilla.netfilter.org/show_bug.cgi?id=610
--- net/netfilter/xt_connlimit.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-)
net/netfilter/xt_connlimit.c +4 -6
@@ -103,7 +103,7 @@ static int count_them(struct xt_connlimit_data *data,const struct nf_conntrack_tuple *tuple, const union nf_inet_addr *addr, const union nf_inet_addr *mask, - const struct xt_match *match) + u_int8_t family) { const struct nf_conntrack_tuple_hash *found;struct xt_connlimit_conn *conn;
@@ -113,8 +113,7 @@ static int count_them(struct xt_connlimit_data *data,bool addit = true;int matches =0 ; - -if (match->family ==NFPROTO_IPV6 ) +if (family ==NFPROTO_IPV6 ) hash = &data->iphash[connlimit_iphash6 (addr, mask)];else hash = &data->iphash[connlimit_iphash (addr->ip & mask->ip)];
@@ -157,8 +156,7 @@ static int count_them(struct xt_connlimit_data *data,continue ; } -if (same_source_net (addr, mask, &conn->tuple.src.u3, - match->family)) +if (same_source_net (addr, mask, &conn->tuple.src.u3, family))/* same source network -> be counted! */ ++matches;nf_ct_put (found_ct);
@@ -207,7 +205,7 @@ connlimit_mt(const struct sk_buff *skb, const struct xt_match_param *par)spin_lock_bh (&info->data->lock); connections =count_them (info->data, tuple_ptr, &addr, - &info->mask, par->match); + &info->mask, par->family);spin_unlock_bh (&info->data->lock);if (connections <0 ) {
Signature · 1 line
# Created with git-export-patch
Quoted 6 lines · Jan Engelhardt
Quoted 5 lines · Patrick McHardy
netfilter:
xt_connlimit: fix regression caused by zero family valueCommit v2.6.28-rc1~7172~1092~2 was slightly incomplete; not all instances of
par->match->familywere changed topar->family.
Quoted 7 lines
Quoted 1 line
Netfilter bugzilla #610.
Hold it.
git would never output ~7172~1092~2 because ~8266 would be much simpler.I originally wrote "Commit v2.6.28-rc1~717^2~109^2~2", but one of your programs seems to eat commit messages or more.
Indeed, my email client displays ^2 as ², which cut and paste transforms to 2 :)
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Patrick McHardy
Indeed, my email client displays ^2 as ², which cut and paste transforms to 2 :)
One more Thunderbird addict^Wvictim :)
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
David Miller
maintainerFrom: Patrick McHardy <[email protected]>
Date: Fri, 06 Nov 2009 15:49:38 +0100
Quoted 9 lines
Quoted 8 lines · Jan Engelhardt
Quoted 6 lines · Patrick McHardy
netfilter:
xt_connlimit: fix regression caused by zero family valueCommit v2.6.28-rc1~7172~1092~2 was slightly incomplete; not all instances of
par->match->familywere changed topar->family.Netfilter bugzilla #610.
Quoted 8 lines
Quoted 5 lines
Hold it.
git would never output ~7172~1092~2 because ~8266 would be much simpler.I originally wrote "Commit v2.6.28-rc1~717^2~109^2~2", but one of your programs seems to eat commit messages or more.
Indeed, my email client displays ^2 as ², which cut and paste transforms to 2 :)
Ok, so I'll apply Jan's fixed up version, thanks!