diff options
author | Duan Jiong <duanj.fnst@cn.fujitsu.com> | 2014-06-29 21:19:32 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-06-30 05:38:03 -0400 |
commit | 24de3d377539e384621c5b8f8f8d8d01852dddc8 (patch) | |
tree | ed111914a78a30dfb8165a0edbb4a56e2e95c69d /net | |
parent | 5cbfda2043814f4989efad12be02086a2e4c59fd (diff) |
netfilter: use IS_ENABLED() macro
replace:
#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
with
#if IS_ENABLED(CONFIG_NF_CT_NETLINK)
replace:
#if !defined(CONFIG_NF_NAT) && !defined(CONFIG_NF_NAT_MODULE)
with
#if !IS_ENABLED(CONFIG_NF_NAT)
replace:
#if !defined(CONFIG_NF_CONNTRACK) && !defined(CONFIG_NF_CONNTRACK_MODULE)
with
#if !IS_ENABLED(CONFIG_NF_CONNTRACK)
And add missing:
IS_ENABLED(CONFIG_NF_CT_NETLINK)
in net/ipv{4,6}/netfilter/nf_nat_l3proto_ipv{4,6}.c
Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 4 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 4 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_defrag_ipv4.c | 8 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_nat_l3proto_ipv4.c | 4 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_nat_proto_gre.c | 2 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_nat_proto_icmp.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/nf_nat_l3proto_ipv6.c | 4 | ||||
-rw-r--r-- | net/netfilter/nf_nat_core.c | 2 | ||||
-rw-r--r-- | net/netfilter/nf_nat_proto_common.c | 2 | ||||
-rw-r--r-- | net/netfilter/nf_nat_proto_dccp.c | 2 | ||||
-rw-r--r-- | net/netfilter/nf_nat_proto_sctp.c | 2 | ||||
-rw-r--r-- | net/netfilter/nf_nat_proto_tcp.c | 2 | ||||
-rw-r--r-- | net/netfilter/nf_nat_proto_udp.c | 2 | ||||
-rw-r--r-- | net/netfilter/nf_nat_proto_udplite.c | 2 |
14 files changed, 25 insertions, 17 deletions
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c index 8127dc802865..4ce44c4bc57b 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | |||
@@ -314,7 +314,7 @@ getorigdst(struct sock *sk, int optval, void __user *user, int *len) | |||
314 | return -ENOENT; | 314 | return -ENOENT; |
315 | } | 315 | } |
316 | 316 | ||
317 | #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) | 317 | #if IS_ENABLED(CONFIG_NF_CT_NETLINK) |
318 | 318 | ||
319 | #include <linux/netfilter/nfnetlink.h> | 319 | #include <linux/netfilter/nfnetlink.h> |
320 | #include <linux/netfilter/nfnetlink_conntrack.h> | 320 | #include <linux/netfilter/nfnetlink_conntrack.h> |
@@ -388,7 +388,7 @@ struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4 __read_mostly = { | |||
388 | .invert_tuple = ipv4_invert_tuple, | 388 | .invert_tuple = ipv4_invert_tuple, |
389 | .print_tuple = ipv4_print_tuple, | 389 | .print_tuple = ipv4_print_tuple, |
390 | .get_l4proto = ipv4_get_l4proto, | 390 | .get_l4proto = ipv4_get_l4proto, |
391 | #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) | 391 | #if IS_ENABLED(CONFIG_NF_CT_NETLINK) |
392 | .tuple_to_nlattr = ipv4_tuple_to_nlattr, | 392 | .tuple_to_nlattr = ipv4_tuple_to_nlattr, |
393 | .nlattr_tuple_size = ipv4_nlattr_tuple_size, | 393 | .nlattr_tuple_size = ipv4_nlattr_tuple_size, |
394 | .nlattr_to_tuple = ipv4_nlattr_to_tuple, | 394 | .nlattr_to_tuple = ipv4_nlattr_to_tuple, |
diff --git a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c index a338dad41b7d..b91b2641adda 100644 --- a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c +++ b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c | |||
@@ -226,7 +226,7 @@ icmp_error(struct net *net, struct nf_conn *tmpl, | |||
226 | return icmp_error_message(net, tmpl, skb, ctinfo, hooknum); | 226 | return icmp_error_message(net, tmpl, skb, ctinfo, hooknum); |
227 | } | 227 | } |
228 | 228 | ||
229 | #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) | 229 | #if IS_ENABLED(CONFIG_NF_CT_NETLINK) |
230 | 230 | ||
231 | #include <linux/netfilter/nfnetlink.h> | 231 | #include <linux/netfilter/nfnetlink.h> |
232 | #include <linux/netfilter/nfnetlink_conntrack.h> | 232 | #include <linux/netfilter/nfnetlink_conntrack.h> |
@@ -408,7 +408,7 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_icmp __read_mostly = | |||
408 | .error = icmp_error, | 408 | .error = icmp_error, |
409 | .destroy = NULL, | 409 | .destroy = NULL, |
410 | .me = NULL, | 410 | .me = NULL, |
411 | #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) | 411 | #if IS_ENABLED(CONFIG_NF_CT_NETLINK) |
412 | .tuple_to_nlattr = icmp_tuple_to_nlattr, | 412 | .tuple_to_nlattr = icmp_tuple_to_nlattr, |
413 | .nlattr_tuple_size = icmp_nlattr_tuple_size, | 413 | .nlattr_tuple_size = icmp_nlattr_tuple_size, |
414 | .nlattr_to_tuple = icmp_nlattr_to_tuple, | 414 | .nlattr_to_tuple = icmp_nlattr_to_tuple, |
diff --git a/net/ipv4/netfilter/nf_defrag_ipv4.c b/net/ipv4/netfilter/nf_defrag_ipv4.c index b8f6381c7d0b..76bd1aef257f 100644 --- a/net/ipv4/netfilter/nf_defrag_ipv4.c +++ b/net/ipv4/netfilter/nf_defrag_ipv4.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/netfilter_bridge.h> | 17 | #include <linux/netfilter_bridge.h> |
18 | #include <linux/netfilter_ipv4.h> | 18 | #include <linux/netfilter_ipv4.h> |
19 | #include <net/netfilter/ipv4/nf_defrag_ipv4.h> | 19 | #include <net/netfilter/ipv4/nf_defrag_ipv4.h> |
20 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 20 | #if IS_ENABLED(CONFIG_NF_CONNTRACK) |
21 | #include <net/netfilter/nf_conntrack.h> | 21 | #include <net/netfilter/nf_conntrack.h> |
22 | #endif | 22 | #endif |
23 | #include <net/netfilter/nf_conntrack_zones.h> | 23 | #include <net/netfilter/nf_conntrack_zones.h> |
@@ -45,7 +45,7 @@ static enum ip_defrag_users nf_ct_defrag_user(unsigned int hooknum, | |||
45 | { | 45 | { |
46 | u16 zone = NF_CT_DEFAULT_ZONE; | 46 | u16 zone = NF_CT_DEFAULT_ZONE; |
47 | 47 | ||
48 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 48 | #if IS_ENABLED(CONFIG_NF_CONNTRACK) |
49 | if (skb->nfct) | 49 | if (skb->nfct) |
50 | zone = nf_ct_zone((struct nf_conn *)skb->nfct); | 50 | zone = nf_ct_zone((struct nf_conn *)skb->nfct); |
51 | #endif | 51 | #endif |
@@ -74,8 +74,8 @@ static unsigned int ipv4_conntrack_defrag(const struct nf_hook_ops *ops, | |||
74 | inet->nodefrag) | 74 | inet->nodefrag) |
75 | return NF_ACCEPT; | 75 | return NF_ACCEPT; |
76 | 76 | ||
77 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 77 | #if IS_ENABLED(CONFIG_NF_CONNTRACK) |
78 | #if !defined(CONFIG_NF_NAT) && !defined(CONFIG_NF_NAT_MODULE) | 78 | #if !IS_ENABLED(CONFIG_NF_NAT) |
79 | /* Previously seen (loopback)? Ignore. Do this before | 79 | /* Previously seen (loopback)? Ignore. Do this before |
80 | fragment check. */ | 80 | fragment check. */ |
81 | if (skb->nfct && !nf_ct_is_template((struct nf_conn *)skb->nfct)) | 81 | if (skb->nfct && !nf_ct_is_template((struct nf_conn *)skb->nfct)) |
diff --git a/net/ipv4/netfilter/nf_nat_l3proto_ipv4.c b/net/ipv4/netfilter/nf_nat_l3proto_ipv4.c index d8b2e14efddc..14f5ccd06337 100644 --- a/net/ipv4/netfilter/nf_nat_l3proto_ipv4.c +++ b/net/ipv4/netfilter/nf_nat_l3proto_ipv4.c | |||
@@ -154,6 +154,7 @@ static void nf_nat_ipv4_csum_recalc(struct sk_buff *skb, | |||
154 | htons(oldlen), htons(datalen), 1); | 154 | htons(oldlen), htons(datalen), 1); |
155 | } | 155 | } |
156 | 156 | ||
157 | #if IS_ENABLED(CONFIG_NF_CT_NETLINK) | ||
157 | static int nf_nat_ipv4_nlattr_to_range(struct nlattr *tb[], | 158 | static int nf_nat_ipv4_nlattr_to_range(struct nlattr *tb[], |
158 | struct nf_nat_range *range) | 159 | struct nf_nat_range *range) |
159 | { | 160 | { |
@@ -169,6 +170,7 @@ static int nf_nat_ipv4_nlattr_to_range(struct nlattr *tb[], | |||
169 | 170 | ||
170 | return 0; | 171 | return 0; |
171 | } | 172 | } |
173 | #endif | ||
172 | 174 | ||
173 | static const struct nf_nat_l3proto nf_nat_l3proto_ipv4 = { | 175 | static const struct nf_nat_l3proto nf_nat_l3proto_ipv4 = { |
174 | .l3proto = NFPROTO_IPV4, | 176 | .l3proto = NFPROTO_IPV4, |
@@ -177,7 +179,9 @@ static const struct nf_nat_l3proto nf_nat_l3proto_ipv4 = { | |||
177 | .manip_pkt = nf_nat_ipv4_manip_pkt, | 179 | .manip_pkt = nf_nat_ipv4_manip_pkt, |
178 | .csum_update = nf_nat_ipv4_csum_update, | 180 | .csum_update = nf_nat_ipv4_csum_update, |
179 | .csum_recalc = nf_nat_ipv4_csum_recalc, | 181 | .csum_recalc = nf_nat_ipv4_csum_recalc, |
182 | #if IS_ENABLED(CONFIG_NF_CT_NETLINK) | ||
180 | .nlattr_to_range = nf_nat_ipv4_nlattr_to_range, | 183 | .nlattr_to_range = nf_nat_ipv4_nlattr_to_range, |
184 | #endif | ||
181 | #ifdef CONFIG_XFRM | 185 | #ifdef CONFIG_XFRM |
182 | .decode_session = nf_nat_ipv4_decode_session, | 186 | .decode_session = nf_nat_ipv4_decode_session, |
183 | #endif | 187 | #endif |
diff --git a/net/ipv4/netfilter/nf_nat_proto_gre.c b/net/ipv4/netfilter/nf_nat_proto_gre.c index 690d890111bb..9414923f1e15 100644 --- a/net/ipv4/netfilter/nf_nat_proto_gre.c +++ b/net/ipv4/netfilter/nf_nat_proto_gre.c | |||
@@ -124,7 +124,7 @@ static const struct nf_nat_l4proto gre = { | |||
124 | .manip_pkt = gre_manip_pkt, | 124 | .manip_pkt = gre_manip_pkt, |
125 | .in_range = nf_nat_l4proto_in_range, | 125 | .in_range = nf_nat_l4proto_in_range, |
126 | .unique_tuple = gre_unique_tuple, | 126 | .unique_tuple = gre_unique_tuple, |
127 | #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) | 127 | #if IS_ENABLED(CONFIG_NF_CT_NETLINK) |
128 | .nlattr_to_range = nf_nat_l4proto_nlattr_to_range, | 128 | .nlattr_to_range = nf_nat_l4proto_nlattr_to_range, |
129 | #endif | 129 | #endif |
130 | }; | 130 | }; |
diff --git a/net/ipv4/netfilter/nf_nat_proto_icmp.c b/net/ipv4/netfilter/nf_nat_proto_icmp.c index eb303471bcf6..4557b4ab8342 100644 --- a/net/ipv4/netfilter/nf_nat_proto_icmp.c +++ b/net/ipv4/netfilter/nf_nat_proto_icmp.c | |||
@@ -77,7 +77,7 @@ const struct nf_nat_l4proto nf_nat_l4proto_icmp = { | |||
77 | .manip_pkt = icmp_manip_pkt, | 77 | .manip_pkt = icmp_manip_pkt, |
78 | .in_range = icmp_in_range, | 78 | .in_range = icmp_in_range, |
79 | .unique_tuple = icmp_unique_tuple, | 79 | .unique_tuple = icmp_unique_tuple, |
80 | #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) | 80 | #if IS_ENABLED(CONFIG_NF_CT_NETLINK) |
81 | .nlattr_to_range = nf_nat_l4proto_nlattr_to_range, | 81 | .nlattr_to_range = nf_nat_l4proto_nlattr_to_range, |
82 | #endif | 82 | #endif |
83 | }; | 83 | }; |
diff --git a/net/ipv6/netfilter/nf_nat_l3proto_ipv6.c b/net/ipv6/netfilter/nf_nat_l3proto_ipv6.c index abfe75a2e316..fc8e49b2ff3e 100644 --- a/net/ipv6/netfilter/nf_nat_l3proto_ipv6.c +++ b/net/ipv6/netfilter/nf_nat_l3proto_ipv6.c | |||
@@ -158,6 +158,7 @@ static void nf_nat_ipv6_csum_recalc(struct sk_buff *skb, | |||
158 | htons(oldlen), htons(datalen), 1); | 158 | htons(oldlen), htons(datalen), 1); |
159 | } | 159 | } |
160 | 160 | ||
161 | #if IS_ENABLED(CONFIG_NF_CT_NETLINK) | ||
161 | static int nf_nat_ipv6_nlattr_to_range(struct nlattr *tb[], | 162 | static int nf_nat_ipv6_nlattr_to_range(struct nlattr *tb[], |
162 | struct nf_nat_range *range) | 163 | struct nf_nat_range *range) |
163 | { | 164 | { |
@@ -175,6 +176,7 @@ static int nf_nat_ipv6_nlattr_to_range(struct nlattr *tb[], | |||
175 | 176 | ||
176 | return 0; | 177 | return 0; |
177 | } | 178 | } |
179 | #endif | ||
178 | 180 | ||
179 | static const struct nf_nat_l3proto nf_nat_l3proto_ipv6 = { | 181 | static const struct nf_nat_l3proto nf_nat_l3proto_ipv6 = { |
180 | .l3proto = NFPROTO_IPV6, | 182 | .l3proto = NFPROTO_IPV6, |
@@ -183,7 +185,9 @@ static const struct nf_nat_l3proto nf_nat_l3proto_ipv6 = { | |||
183 | .manip_pkt = nf_nat_ipv6_manip_pkt, | 185 | .manip_pkt = nf_nat_ipv6_manip_pkt, |
184 | .csum_update = nf_nat_ipv6_csum_update, | 186 | .csum_update = nf_nat_ipv6_csum_update, |
185 | .csum_recalc = nf_nat_ipv6_csum_recalc, | 187 | .csum_recalc = nf_nat_ipv6_csum_recalc, |
188 | #if IS_ENABLED(CONFIG_NF_CT_NETLINK) | ||
186 | .nlattr_to_range = nf_nat_ipv6_nlattr_to_range, | 189 | .nlattr_to_range = nf_nat_ipv6_nlattr_to_range, |
190 | #endif | ||
187 | #ifdef CONFIG_XFRM | 191 | #ifdef CONFIG_XFRM |
188 | .decode_session = nf_nat_ipv6_decode_session, | 192 | .decode_session = nf_nat_ipv6_decode_session, |
189 | #endif | 193 | #endif |
diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c index 09096a670c45..31c5015394e9 100644 --- a/net/netfilter/nf_nat_core.c +++ b/net/netfilter/nf_nat_core.c | |||
@@ -677,7 +677,7 @@ static struct nf_ct_ext_type nat_extend __read_mostly = { | |||
677 | .flags = NF_CT_EXT_F_PREALLOC, | 677 | .flags = NF_CT_EXT_F_PREALLOC, |
678 | }; | 678 | }; |
679 | 679 | ||
680 | #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) | 680 | #if IS_ENABLED(CONFIG_NF_CT_NETLINK) |
681 | 681 | ||
682 | #include <linux/netfilter/nfnetlink.h> | 682 | #include <linux/netfilter/nfnetlink.h> |
683 | #include <linux/netfilter/nfnetlink_conntrack.h> | 683 | #include <linux/netfilter/nfnetlink_conntrack.h> |
diff --git a/net/netfilter/nf_nat_proto_common.c b/net/netfilter/nf_nat_proto_common.c index 83a72a235cae..fbce552a796e 100644 --- a/net/netfilter/nf_nat_proto_common.c +++ b/net/netfilter/nf_nat_proto_common.c | |||
@@ -95,7 +95,7 @@ void nf_nat_l4proto_unique_tuple(const struct nf_nat_l3proto *l3proto, | |||
95 | } | 95 | } |
96 | EXPORT_SYMBOL_GPL(nf_nat_l4proto_unique_tuple); | 96 | EXPORT_SYMBOL_GPL(nf_nat_l4proto_unique_tuple); |
97 | 97 | ||
98 | #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) | 98 | #if IS_ENABLED(CONFIG_NF_CT_NETLINK) |
99 | int nf_nat_l4proto_nlattr_to_range(struct nlattr *tb[], | 99 | int nf_nat_l4proto_nlattr_to_range(struct nlattr *tb[], |
100 | struct nf_nat_range *range) | 100 | struct nf_nat_range *range) |
101 | { | 101 | { |
diff --git a/net/netfilter/nf_nat_proto_dccp.c b/net/netfilter/nf_nat_proto_dccp.c index c8be2cdac0bf..b8067b53ff3a 100644 --- a/net/netfilter/nf_nat_proto_dccp.c +++ b/net/netfilter/nf_nat_proto_dccp.c | |||
@@ -78,7 +78,7 @@ static const struct nf_nat_l4proto nf_nat_l4proto_dccp = { | |||
78 | .manip_pkt = dccp_manip_pkt, | 78 | .manip_pkt = dccp_manip_pkt, |
79 | .in_range = nf_nat_l4proto_in_range, | 79 | .in_range = nf_nat_l4proto_in_range, |
80 | .unique_tuple = dccp_unique_tuple, | 80 | .unique_tuple = dccp_unique_tuple, |
81 | #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) | 81 | #if IS_ENABLED(CONFIG_NF_CT_NETLINK) |
82 | .nlattr_to_range = nf_nat_l4proto_nlattr_to_range, | 82 | .nlattr_to_range = nf_nat_l4proto_nlattr_to_range, |
83 | #endif | 83 | #endif |
84 | }; | 84 | }; |
diff --git a/net/netfilter/nf_nat_proto_sctp.c b/net/netfilter/nf_nat_proto_sctp.c index 754536f2c674..cbc7ade1487b 100644 --- a/net/netfilter/nf_nat_proto_sctp.c +++ b/net/netfilter/nf_nat_proto_sctp.c | |||
@@ -59,7 +59,7 @@ static const struct nf_nat_l4proto nf_nat_l4proto_sctp = { | |||
59 | .manip_pkt = sctp_manip_pkt, | 59 | .manip_pkt = sctp_manip_pkt, |
60 | .in_range = nf_nat_l4proto_in_range, | 60 | .in_range = nf_nat_l4proto_in_range, |
61 | .unique_tuple = sctp_unique_tuple, | 61 | .unique_tuple = sctp_unique_tuple, |
62 | #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) | 62 | #if IS_ENABLED(CONFIG_NF_CT_NETLINK) |
63 | .nlattr_to_range = nf_nat_l4proto_nlattr_to_range, | 63 | .nlattr_to_range = nf_nat_l4proto_nlattr_to_range, |
64 | #endif | 64 | #endif |
65 | }; | 65 | }; |
diff --git a/net/netfilter/nf_nat_proto_tcp.c b/net/netfilter/nf_nat_proto_tcp.c index 83ec8a6e4c36..37f5505f4529 100644 --- a/net/netfilter/nf_nat_proto_tcp.c +++ b/net/netfilter/nf_nat_proto_tcp.c | |||
@@ -79,7 +79,7 @@ const struct nf_nat_l4proto nf_nat_l4proto_tcp = { | |||
79 | .manip_pkt = tcp_manip_pkt, | 79 | .manip_pkt = tcp_manip_pkt, |
80 | .in_range = nf_nat_l4proto_in_range, | 80 | .in_range = nf_nat_l4proto_in_range, |
81 | .unique_tuple = tcp_unique_tuple, | 81 | .unique_tuple = tcp_unique_tuple, |
82 | #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) | 82 | #if IS_ENABLED(CONFIG_NF_CT_NETLINK) |
83 | .nlattr_to_range = nf_nat_l4proto_nlattr_to_range, | 83 | .nlattr_to_range = nf_nat_l4proto_nlattr_to_range, |
84 | #endif | 84 | #endif |
85 | }; | 85 | }; |
diff --git a/net/netfilter/nf_nat_proto_udp.c b/net/netfilter/nf_nat_proto_udp.c index 7df613fb34a2..b0ede2f0d8bc 100644 --- a/net/netfilter/nf_nat_proto_udp.c +++ b/net/netfilter/nf_nat_proto_udp.c | |||
@@ -70,7 +70,7 @@ const struct nf_nat_l4proto nf_nat_l4proto_udp = { | |||
70 | .manip_pkt = udp_manip_pkt, | 70 | .manip_pkt = udp_manip_pkt, |
71 | .in_range = nf_nat_l4proto_in_range, | 71 | .in_range = nf_nat_l4proto_in_range, |
72 | .unique_tuple = udp_unique_tuple, | 72 | .unique_tuple = udp_unique_tuple, |
73 | #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) | 73 | #if IS_ENABLED(CONFIG_NF_CT_NETLINK) |
74 | .nlattr_to_range = nf_nat_l4proto_nlattr_to_range, | 74 | .nlattr_to_range = nf_nat_l4proto_nlattr_to_range, |
75 | #endif | 75 | #endif |
76 | }; | 76 | }; |
diff --git a/net/netfilter/nf_nat_proto_udplite.c b/net/netfilter/nf_nat_proto_udplite.c index 776a0d1317b1..368f14e01e75 100644 --- a/net/netfilter/nf_nat_proto_udplite.c +++ b/net/netfilter/nf_nat_proto_udplite.c | |||
@@ -69,7 +69,7 @@ static const struct nf_nat_l4proto nf_nat_l4proto_udplite = { | |||
69 | .manip_pkt = udplite_manip_pkt, | 69 | .manip_pkt = udplite_manip_pkt, |
70 | .in_range = nf_nat_l4proto_in_range, | 70 | .in_range = nf_nat_l4proto_in_range, |
71 | .unique_tuple = udplite_unique_tuple, | 71 | .unique_tuple = udplite_unique_tuple, |
72 | #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) | 72 | #if IS_ENABLED(CONFIG_NF_CT_NETLINK) |
73 | .nlattr_to_range = nf_nat_l4proto_nlattr_to_range, | 73 | .nlattr_to_range = nf_nat_l4proto_nlattr_to_range, |
74 | #endif | 74 | #endif |
75 | }; | 75 | }; |