diff options
author | David S. Miller <davem@davemloft.net> | 2013-06-24 15:45:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-24 15:45:24 -0400 |
commit | a3d9dd89b781bdcb14201847608b658442de812b (patch) | |
tree | a5f0be09bc4d591cdc7b4422efd8c0d9c41fb722 /net/ipv4 | |
parent | f57da7a65b386dd4535daa4f7a3773a025fbb022 (diff) | |
parent | c8fc51cfa758be945c6113a4b446e0159070f768 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
Pablo Neira Ayuso says:
====================
The following patchset contains five fixes for Netfilter/IPVS, they are:
* A skb leak fix in fragmentation handling in case that helpers are in place,
it occurs since the IPV6 NAT infrastructure, from Phil Oester.
* Fix SCTP port mangling in ICMP packets for IPVS, from Julian Anastasov.
* Fix event delivery in ctnetlink regarding the new connlabel infrastructure,
from Florian Westphal.
* Fix mangling in the SIP NAT helper, from Balazs Peter Odor.
* Fix crash in ipt_ULOG introduced while adding netnamespace support,
from Gao Feng.
I'll take care of passing several of these patches to -stable once they hit
Linus' tree.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/ipt_ULOG.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c index ff4b781b1056..32b0e978c8e0 100644 --- a/net/ipv4/netfilter/ipt_ULOG.c +++ b/net/ipv4/netfilter/ipt_ULOG.c | |||
@@ -125,15 +125,16 @@ static void ulog_send(struct ulog_net *ulog, unsigned int nlgroupnum) | |||
125 | /* timer function to flush queue in flushtimeout time */ | 125 | /* timer function to flush queue in flushtimeout time */ |
126 | static void ulog_timer(unsigned long data) | 126 | static void ulog_timer(unsigned long data) |
127 | { | 127 | { |
128 | unsigned int groupnum = *((unsigned int *)data); | ||
128 | struct ulog_net *ulog = container_of((void *)data, | 129 | struct ulog_net *ulog = container_of((void *)data, |
129 | struct ulog_net, | 130 | struct ulog_net, |
130 | nlgroup[*(unsigned int *)data]); | 131 | nlgroup[groupnum]); |
131 | pr_debug("timer function called, calling ulog_send\n"); | 132 | pr_debug("timer function called, calling ulog_send\n"); |
132 | 133 | ||
133 | /* lock to protect against somebody modifying our structure | 134 | /* lock to protect against somebody modifying our structure |
134 | * from ipt_ulog_target at the same time */ | 135 | * from ipt_ulog_target at the same time */ |
135 | spin_lock_bh(&ulog->lock); | 136 | spin_lock_bh(&ulog->lock); |
136 | ulog_send(ulog, data); | 137 | ulog_send(ulog, groupnum); |
137 | spin_unlock_bh(&ulog->lock); | 138 | spin_unlock_bh(&ulog->lock); |
138 | } | 139 | } |
139 | 140 | ||
@@ -407,8 +408,11 @@ static int __net_init ulog_tg_net_init(struct net *net) | |||
407 | 408 | ||
408 | spin_lock_init(&ulog->lock); | 409 | spin_lock_init(&ulog->lock); |
409 | /* initialize ulog_buffers */ | 410 | /* initialize ulog_buffers */ |
410 | for (i = 0; i < ULOG_MAXNLGROUPS; i++) | 411 | for (i = 0; i < ULOG_MAXNLGROUPS; i++) { |
411 | setup_timer(&ulog->ulog_buffers[i].timer, ulog_timer, i); | 412 | ulog->nlgroup[i] = i; |
413 | setup_timer(&ulog->ulog_buffers[i].timer, ulog_timer, | ||
414 | (unsigned long)&ulog->nlgroup[i]); | ||
415 | } | ||
412 | 416 | ||
413 | ulog->nflognl = netlink_kernel_create(net, NETLINK_NFLOG, &cfg); | 417 | ulog->nflognl = netlink_kernel_create(net, NETLINK_NFLOG, &cfg); |
414 | if (!ulog->nflognl) | 418 | if (!ulog->nflognl) |