diff mbox series

[nf-next,19/29] netfilter: wrap union nf_conntrack_proto members in CONFIG_NF_CT_PROTO_* check.

Message ID 20190901205126.6935-20-jeremy@azazel.net
State Changes Requested
Delegated to: Pablo Neira
Headers show
Series Add config option checks to netfilter headers. | expand

Commit Message

Jeremy Sowden Sept. 1, 2019, 8:51 p.m. UTC
dccp, sctp and gre are only used in code enabled by particular
CONFIG_NF_CT_PROTO_* options.  Wrap them in the checks for those
options.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
 include/net/netfilter/nf_conntrack.h | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index 22275f42f0bb..0673cf685741 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -33,11 +33,17 @@  struct nf_ct_udp {
 /* per conntrack: protocol private data */
 union nf_conntrack_proto {
 	/* insert conntrack proto private data here */
+#ifdef CONFIG_NF_CT_PROTO_DCCP
 	struct nf_ct_dccp dccp;
+#endif
+#ifdef CONFIG_NF_CT_PROTO_SCTP
 	struct ip_ct_sctp sctp;
+#endif
 	struct ip_ct_tcp tcp;
 	struct nf_ct_udp udp;
+#ifdef CONFIG_NF_CT_PROTO_GRE
 	struct nf_ct_gre gre;
+#endif
 	unsigned int tmpl_padto;
 };