diff options
author | Eric Paris <eparis@redhat.com> | 2010-10-19 18:17:32 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-10-20 19:13:00 -0400 |
commit | ff660c80d00b52287f1f67ee6c115dc0057bcdde (patch) | |
tree | 63a0e4c69b9d78b5b81156029d5599dc2f3bf0a4 /net | |
parent | 845ca30fe9691f1bab7cfbf30b6d11c944eb4abd (diff) |
secmark: fix config problem when CONFIG_NF_CONNTRACK_SECMARK is not set
When CONFIG_NF_CONNTRACK_SECMARK is not set we accidentally attempt to use
the secmark fielf of struct nf_conn. Problem is when that config isn't set
the field doesn't exist. whoops. Wrap the incorrect usage in the config.
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index b3c628555cf3..146476c6441a 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -582,9 +582,11 @@ ctnetlink_conntrack_event(unsigned int events, struct nf_ct_event *item) | |||
582 | && ctnetlink_dump_helpinfo(skb, ct) < 0) | 582 | && ctnetlink_dump_helpinfo(skb, ct) < 0) |
583 | goto nla_put_failure; | 583 | goto nla_put_failure; |
584 | 584 | ||
585 | #ifdef CONFIG_NF_CONNTRACK_SECMARK | ||
585 | if ((events & (1 << IPCT_SECMARK) || ct->secmark) | 586 | if ((events & (1 << IPCT_SECMARK) || ct->secmark) |
586 | && ctnetlink_dump_secctx(skb, ct) < 0) | 587 | && ctnetlink_dump_secctx(skb, ct) < 0) |
587 | goto nla_put_failure; | 588 | goto nla_put_failure; |
589 | #endif | ||
588 | 590 | ||
589 | if (events & (1 << IPCT_RELATED) && | 591 | if (events & (1 << IPCT_RELATED) && |
590 | ctnetlink_dump_master(skb, ct) < 0) | 592 | ctnetlink_dump_master(skb, ct) < 0) |