diff options
author | David S. Miller <davem@davemloft.net> | 2013-05-16 17:32:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-16 17:32:42 -0400 |
commit | 5c4b274981950049af3330f14ed9e9aa25afb2fb (patch) | |
tree | a4a154f7e49220a46124b29801f07830f28ca81d /net/ipv4 | |
parent | 755ccb9d577b95b43537cfeb36da59140412f858 (diff) | |
parent | bc6bcb59dd7c184d229f9e86d08aa56059938a4c (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
Pablo Neira Ayuso says:
====================
The following patchset contains three Netfilter fixes and update
for the MAINTAINER file for your net tree, they are:
* Fix crash if nf_log_packet is called from conntrack, in that case
both interfaces are NULL, from Hans Schillstrom. This bug introduced
with the logging netns support in the previous merge window.
* Fix compilation of nf_log and nf_queue without CONFIG_PROC_FS,
from myself. This bug was introduced in the previous merge window
with the new netns support for the netfilter logging infrastructure.
* Fix possible crash in xt_TCPOPTSTRIP due to missing sanity
checkings to validate that the TCP header is well-formed, from
myself. I can find this bug in 2.6.25, probably it's been there
since the beginning. I'll pass this to -stable.
* Update MAINTAINER file to point to new nf trees at git.kernel.org,
remove Harald and use M: instead of P: (now obsolete tag) to
keep Jozsef in the list of people.
Please, consider pulling this. Thanks!
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/ipt_ULOG.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c index f8a222cb6448..cf08218ddbcf 100644 --- a/net/ipv4/netfilter/ipt_ULOG.c +++ b/net/ipv4/netfilter/ipt_ULOG.c | |||
@@ -162,7 +162,8 @@ static struct sk_buff *ulog_alloc_skb(unsigned int size) | |||
162 | return skb; | 162 | return skb; |
163 | } | 163 | } |
164 | 164 | ||
165 | static void ipt_ulog_packet(unsigned int hooknum, | 165 | static void ipt_ulog_packet(struct net *net, |
166 | unsigned int hooknum, | ||
166 | const struct sk_buff *skb, | 167 | const struct sk_buff *skb, |
167 | const struct net_device *in, | 168 | const struct net_device *in, |
168 | const struct net_device *out, | 169 | const struct net_device *out, |
@@ -174,7 +175,6 @@ static void ipt_ulog_packet(unsigned int hooknum, | |||
174 | size_t size, copy_len; | 175 | size_t size, copy_len; |
175 | struct nlmsghdr *nlh; | 176 | struct nlmsghdr *nlh; |
176 | struct timeval tv; | 177 | struct timeval tv; |
177 | struct net *net = dev_net(in ? in : out); | ||
178 | struct ulog_net *ulog = ulog_pernet(net); | 178 | struct ulog_net *ulog = ulog_pernet(net); |
179 | 179 | ||
180 | /* ffs == find first bit set, necessary because userspace | 180 | /* ffs == find first bit set, necessary because userspace |
@@ -291,12 +291,15 @@ alloc_failure: | |||
291 | static unsigned int | 291 | static unsigned int |
292 | ulog_tg(struct sk_buff *skb, const struct xt_action_param *par) | 292 | ulog_tg(struct sk_buff *skb, const struct xt_action_param *par) |
293 | { | 293 | { |
294 | ipt_ulog_packet(par->hooknum, skb, par->in, par->out, | 294 | struct net *net = dev_net(par->in ? par->in : par->out); |
295 | |||
296 | ipt_ulog_packet(net, par->hooknum, skb, par->in, par->out, | ||
295 | par->targinfo, NULL); | 297 | par->targinfo, NULL); |
296 | return XT_CONTINUE; | 298 | return XT_CONTINUE; |
297 | } | 299 | } |
298 | 300 | ||
299 | static void ipt_logfn(u_int8_t pf, | 301 | static void ipt_logfn(struct net *net, |
302 | u_int8_t pf, | ||
300 | unsigned int hooknum, | 303 | unsigned int hooknum, |
301 | const struct sk_buff *skb, | 304 | const struct sk_buff *skb, |
302 | const struct net_device *in, | 305 | const struct net_device *in, |
@@ -318,7 +321,7 @@ static void ipt_logfn(u_int8_t pf, | |||
318 | strlcpy(loginfo.prefix, prefix, sizeof(loginfo.prefix)); | 321 | strlcpy(loginfo.prefix, prefix, sizeof(loginfo.prefix)); |
319 | } | 322 | } |
320 | 323 | ||
321 | ipt_ulog_packet(hooknum, skb, in, out, &loginfo, prefix); | 324 | ipt_ulog_packet(net, hooknum, skb, in, out, &loginfo, prefix); |
322 | } | 325 | } |
323 | 326 | ||
324 | static int ulog_tg_check(const struct xt_tgchk_param *par) | 327 | static int ulog_tg_check(const struct xt_tgchk_param *par) |