]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
secmark: fix config problem when CONFIG_NF_CONNTRACK_SECMARK is not set
authorEric Paris <eparis@redhat.com>
Tue, 19 Oct 2010 22:17:32 +0000 (18:17 -0400)
committerJames Morris <jmorris@namei.org>
Wed, 20 Oct 2010 23:13:00 +0000 (10:13 +1100)
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>
net/netfilter/nf_conntrack_netlink.c

index b3c628555cf3645d85a0816227d881dc9b295971..146476c6441a9ea8894d78bc5a00c558c84a0874 100644 (file)
@@ -582,9 +582,11 @@ ctnetlink_conntrack_event(unsigned int events, struct nf_ct_event *item)
                    && ctnetlink_dump_helpinfo(skb, ct) < 0)
                        goto nla_put_failure;
 
+#ifdef CONFIG_NF_CONNTRACK_SECMARK
                if ((events & (1 << IPCT_SECMARK) || ct->secmark)
                    && ctnetlink_dump_secctx(skb, ct) < 0)
                        goto nla_put_failure;
+#endif
 
                if (events & (1 << IPCT_RELATED) &&
                    ctnetlink_dump_master(skb, ct) < 0)