diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_netlink.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c index faa027ba687e..04137d0c164c 100644 --- a/net/ipv4/netfilter/ip_conntrack_netlink.c +++ b/net/ipv4/netfilter/ip_conntrack_netlink.c | |||
@@ -312,29 +312,22 @@ static int ctnetlink_conntrack_event(struct notifier_block *this, | |||
312 | if (events & IPCT_DESTROY) { | 312 | if (events & IPCT_DESTROY) { |
313 | type = IPCTNL_MSG_CT_DELETE; | 313 | type = IPCTNL_MSG_CT_DELETE; |
314 | group = NFNLGRP_CONNTRACK_DESTROY; | 314 | group = NFNLGRP_CONNTRACK_DESTROY; |
315 | goto alloc_skb; | 315 | } else if (events & (IPCT_NEW | IPCT_RELATED)) { |
316 | } | ||
317 | if (events & (IPCT_NEW | IPCT_RELATED)) { | ||
318 | type = IPCTNL_MSG_CT_NEW; | 316 | type = IPCTNL_MSG_CT_NEW; |
319 | flags = NLM_F_CREATE|NLM_F_EXCL; | 317 | flags = NLM_F_CREATE|NLM_F_EXCL; |
320 | /* dump everything */ | 318 | /* dump everything */ |
321 | events = ~0UL; | 319 | events = ~0UL; |
322 | group = NFNLGRP_CONNTRACK_NEW; | 320 | group = NFNLGRP_CONNTRACK_NEW; |
323 | goto alloc_skb; | 321 | } else if (events & (IPCT_STATUS | |
324 | } | ||
325 | if (events & (IPCT_STATUS | | ||
326 | IPCT_PROTOINFO | | 322 | IPCT_PROTOINFO | |
327 | IPCT_HELPER | | 323 | IPCT_HELPER | |
328 | IPCT_HELPINFO | | 324 | IPCT_HELPINFO | |
329 | IPCT_NATINFO)) { | 325 | IPCT_NATINFO)) { |
330 | type = IPCTNL_MSG_CT_NEW; | 326 | type = IPCTNL_MSG_CT_NEW; |
331 | group = NFNLGRP_CONNTRACK_UPDATE; | 327 | group = NFNLGRP_CONNTRACK_UPDATE; |
332 | goto alloc_skb; | 328 | } else |
333 | } | 329 | return NOTIFY_DONE; |
334 | 330 | ||
335 | return NOTIFY_DONE; | ||
336 | |||
337 | alloc_skb: | ||
338 | /* FIXME: Check if there are any listeners before, don't hurt performance */ | 331 | /* FIXME: Check if there are any listeners before, don't hurt performance */ |
339 | 332 | ||
340 | skb = alloc_skb(NLMSG_GOODSIZE, GFP_ATOMIC); | 333 | skb = alloc_skb(NLMSG_GOODSIZE, GFP_ATOMIC); |