aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorIgor Maravić <igorm@etf.rs>2011-12-11 21:58:24 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-16 15:49:52 -0500
commitc0cd115667bcd23c2a31fe2114beaab3608de68c (patch)
tree886a94793dcbe9797c593d465aa4f37039231422 /net
parent29c36262383d37c6149cf26afd39c3389dd23135 (diff)
net:netfilter: use IS_ENABLED
Use IS_ENABLED(CONFIG_FOO) instead of defined(CONFIG_FOO) || defined (CONFIG_FOO_MODULE) Signed-off-by: Igor Maravić <igorm@etf.rs> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/core.c2
-rw-r--r--net/netfilter/ipset/ip_set_getport.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_xmit.c8
-rw-r--r--net/netfilter/nf_conntrack_core.c2
-rw-r--r--net/netfilter/nf_conntrack_h323_main.c3
-rw-r--r--net/netfilter/nf_conntrack_proto_dccp.c6
-rw-r--r--net/netfilter/nf_conntrack_proto_gre.c2
-rw-r--r--net/netfilter/nf_conntrack_proto_sctp.c6
-rw-r--r--net/netfilter/nf_conntrack_proto_tcp.c6
-rw-r--r--net/netfilter/nf_conntrack_proto_udp.c4
-rw-r--r--net/netfilter/nf_conntrack_proto_udplite.c4
-rw-r--r--net/netfilter/xt_NFQUEUE.c4
-rw-r--r--net/netfilter/xt_TCPMSS.c6
-rw-r--r--net/netfilter/xt_TCPOPTSTRIP.c4
-rw-r--r--net/netfilter/xt_TEE.c2
-rw-r--r--net/netfilter/xt_TPROXY.c2
-rw-r--r--net/netfilter/xt_addrtype.c8
-rw-r--r--net/netfilter/xt_hashlimit.c16
-rw-r--r--net/netfilter/xt_socket.c4
19 files changed, 45 insertions, 46 deletions
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index 4aa0f4b19bd8..b4e8ff05b301 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -229,7 +229,7 @@ int skb_make_writable(struct sk_buff *skb, unsigned int writable_len)
229} 229}
230EXPORT_SYMBOL(skb_make_writable); 230EXPORT_SYMBOL(skb_make_writable);
231 231
232#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 232#if IS_ENABLED(CONFIG_NF_CONNTRACK)
233/* This does not belong here, but locally generated errors need it if connection 233/* This does not belong here, but locally generated errors need it if connection
234 tracking in use: without this, connection may not be in hash table, and hence 234 tracking in use: without this, connection may not be in hash table, and hence
235 manufactured ICMP or RST packets will not be associated with it. */ 235 manufactured ICMP or RST packets will not be associated with it. */
diff --git a/net/netfilter/ipset/ip_set_getport.c b/net/netfilter/ipset/ip_set_getport.c
index b71a6e7ab0a5..1f03556666f4 100644
--- a/net/netfilter/ipset/ip_set_getport.c
+++ b/net/netfilter/ipset/ip_set_getport.c
@@ -109,7 +109,7 @@ ip_set_get_ip4_port(const struct sk_buff *skb, bool src,
109} 109}
110EXPORT_SYMBOL_GPL(ip_set_get_ip4_port); 110EXPORT_SYMBOL_GPL(ip_set_get_ip4_port);
111 111
112#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 112#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
113bool 113bool
114ip_set_get_ip6_port(const struct sk_buff *skb, bool src, 114ip_set_get_ip6_port(const struct sk_buff *skb, bool src,
115 __be16 *port, u8 *proto) 115 __be16 *port, u8 *proto)
diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
index 38a576d05b4b..72b82b8ac5a7 100644
--- a/net/netfilter/ipvs/ip_vs_xmit.c
+++ b/net/netfilter/ipvs/ip_vs_xmit.c
@@ -541,7 +541,7 @@ ip_vs_nat_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
541 * Avoid duplicate tuple in reply direction for NAT traffic 541 * Avoid duplicate tuple in reply direction for NAT traffic
542 * to local address when connection is sync-ed 542 * to local address when connection is sync-ed
543 */ 543 */
544#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 544#if IS_ENABLED(CONFIG_NF_CONNTRACK)
545 if (cp->flags & IP_VS_CONN_F_SYNC && local) { 545 if (cp->flags & IP_VS_CONN_F_SYNC && local) {
546 enum ip_conntrack_info ctinfo; 546 enum ip_conntrack_info ctinfo;
547 struct nf_conn *ct = ct = nf_ct_get(skb, &ctinfo); 547 struct nf_conn *ct = ct = nf_ct_get(skb, &ctinfo);
@@ -658,7 +658,7 @@ ip_vs_nat_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
658 * Avoid duplicate tuple in reply direction for NAT traffic 658 * Avoid duplicate tuple in reply direction for NAT traffic
659 * to local address when connection is sync-ed 659 * to local address when connection is sync-ed
660 */ 660 */
661#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 661#if IS_ENABLED(CONFIG_NF_CONNTRACK)
662 if (cp->flags & IP_VS_CONN_F_SYNC && local) { 662 if (cp->flags & IP_VS_CONN_F_SYNC && local) {
663 enum ip_conntrack_info ctinfo; 663 enum ip_conntrack_info ctinfo;
664 struct nf_conn *ct = ct = nf_ct_get(skb, &ctinfo); 664 struct nf_conn *ct = ct = nf_ct_get(skb, &ctinfo);
@@ -1173,7 +1173,7 @@ ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
1173 * Avoid duplicate tuple in reply direction for NAT traffic 1173 * Avoid duplicate tuple in reply direction for NAT traffic
1174 * to local address when connection is sync-ed 1174 * to local address when connection is sync-ed
1175 */ 1175 */
1176#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 1176#if IS_ENABLED(CONFIG_NF_CONNTRACK)
1177 if (cp->flags & IP_VS_CONN_F_SYNC && local) { 1177 if (cp->flags & IP_VS_CONN_F_SYNC && local) {
1178 enum ip_conntrack_info ctinfo; 1178 enum ip_conntrack_info ctinfo;
1179 struct nf_conn *ct = ct = nf_ct_get(skb, &ctinfo); 1179 struct nf_conn *ct = ct = nf_ct_get(skb, &ctinfo);
@@ -1293,7 +1293,7 @@ ip_vs_icmp_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
1293 * Avoid duplicate tuple in reply direction for NAT traffic 1293 * Avoid duplicate tuple in reply direction for NAT traffic
1294 * to local address when connection is sync-ed 1294 * to local address when connection is sync-ed
1295 */ 1295 */
1296#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 1296#if IS_ENABLED(CONFIG_NF_CONNTRACK)
1297 if (cp->flags & IP_VS_CONN_F_SYNC && local) { 1297 if (cp->flags & IP_VS_CONN_F_SYNC && local) {
1298 enum ip_conntrack_info ctinfo; 1298 enum ip_conntrack_info ctinfo;
1299 struct nf_conn *ct = ct = nf_ct_get(skb, &ctinfo); 1299 struct nf_conn *ct = ct = nf_ct_get(skb, &ctinfo);
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 7202b0631cd6..32279dcd03cf 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1087,7 +1087,7 @@ static struct nf_ct_ext_type nf_ct_zone_extend __read_mostly = {
1087}; 1087};
1088#endif 1088#endif
1089 1089
1090#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 1090#if IS_ENABLED(CONFIG_NF_CT_NETLINK)
1091 1091
1092#include <linux/netfilter/nfnetlink.h> 1092#include <linux/netfilter/nfnetlink.h>
1093#include <linux/netfilter/nfnetlink_conntrack.h> 1093#include <linux/netfilter/nfnetlink_conntrack.h>
diff --git a/net/netfilter/nf_conntrack_h323_main.c b/net/netfilter/nf_conntrack_h323_main.c
index f9368f33e7af..813ad393d189 100644
--- a/net/netfilter/nf_conntrack_h323_main.c
+++ b/net/netfilter/nf_conntrack_h323_main.c
@@ -743,8 +743,7 @@ static int callforward_do_filter(const union nf_inet_addr *src,
743 } 743 }
744 break; 744 break;
745 } 745 }
746#if defined(CONFIG_NF_CONNTRACK_IPV6) || \ 746#if IS_ENABLED(CONFIG_NF_CONNTRACK_IPV6)
747 defined(CONFIG_NF_CONNTRACK_IPV6_MODULE)
748 case AF_INET6: { 747 case AF_INET6: {
749 struct flowi6 fl1, fl2; 748 struct flowi6 fl1, fl2;
750 struct rt6_info *rt1, *rt2; 749 struct rt6_info *rt1, *rt2;
diff --git a/net/netfilter/nf_conntrack_proto_dccp.c b/net/netfilter/nf_conntrack_proto_dccp.c
index 2e664a69d7db..d6dde6dc09e6 100644
--- a/net/netfilter/nf_conntrack_proto_dccp.c
+++ b/net/netfilter/nf_conntrack_proto_dccp.c
@@ -629,7 +629,7 @@ static int dccp_print_conntrack(struct seq_file *s, struct nf_conn *ct)
629 return seq_printf(s, "%s ", dccp_state_names[ct->proto.dccp.state]); 629 return seq_printf(s, "%s ", dccp_state_names[ct->proto.dccp.state]);
630} 630}
631 631
632#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 632#if IS_ENABLED(CONFIG_NF_CT_NETLINK)
633static int dccp_to_nlattr(struct sk_buff *skb, struct nlattr *nla, 633static int dccp_to_nlattr(struct sk_buff *skb, struct nlattr *nla,
634 struct nf_conn *ct) 634 struct nf_conn *ct)
635{ 635{
@@ -770,7 +770,7 @@ static struct nf_conntrack_l4proto dccp_proto4 __read_mostly = {
770 .error = dccp_error, 770 .error = dccp_error,
771 .print_tuple = dccp_print_tuple, 771 .print_tuple = dccp_print_tuple,
772 .print_conntrack = dccp_print_conntrack, 772 .print_conntrack = dccp_print_conntrack,
773#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 773#if IS_ENABLED(CONFIG_NF_CT_NETLINK)
774 .to_nlattr = dccp_to_nlattr, 774 .to_nlattr = dccp_to_nlattr,
775 .nlattr_size = dccp_nlattr_size, 775 .nlattr_size = dccp_nlattr_size,
776 .from_nlattr = nlattr_to_dccp, 776 .from_nlattr = nlattr_to_dccp,
@@ -792,7 +792,7 @@ static struct nf_conntrack_l4proto dccp_proto6 __read_mostly = {
792 .error = dccp_error, 792 .error = dccp_error,
793 .print_tuple = dccp_print_tuple, 793 .print_tuple = dccp_print_tuple,
794 .print_conntrack = dccp_print_conntrack, 794 .print_conntrack = dccp_print_conntrack,
795#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 795#if IS_ENABLED(CONFIG_NF_CT_NETLINK)
796 .to_nlattr = dccp_to_nlattr, 796 .to_nlattr = dccp_to_nlattr,
797 .nlattr_size = dccp_nlattr_size, 797 .nlattr_size = dccp_nlattr_size,
798 .from_nlattr = nlattr_to_dccp, 798 .from_nlattr = nlattr_to_dccp,
diff --git a/net/netfilter/nf_conntrack_proto_gre.c b/net/netfilter/nf_conntrack_proto_gre.c
index d69facdd9a7a..f0338791b822 100644
--- a/net/netfilter/nf_conntrack_proto_gre.c
+++ b/net/netfilter/nf_conntrack_proto_gre.c
@@ -291,7 +291,7 @@ static struct nf_conntrack_l4proto nf_conntrack_l4proto_gre4 __read_mostly = {
291 .new = gre_new, 291 .new = gre_new,
292 .destroy = gre_destroy, 292 .destroy = gre_destroy,
293 .me = THIS_MODULE, 293 .me = THIS_MODULE,
294#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 294#if IS_ENABLED(CONFIG_NF_CT_NETLINK)
295 .tuple_to_nlattr = nf_ct_port_tuple_to_nlattr, 295 .tuple_to_nlattr = nf_ct_port_tuple_to_nlattr,
296 .nlattr_tuple_size = nf_ct_port_nlattr_tuple_size, 296 .nlattr_tuple_size = nf_ct_port_nlattr_tuple_size,
297 .nlattr_to_tuple = nf_ct_port_nlattr_to_tuple, 297 .nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c
index 6772b1154654..afa69136061a 100644
--- a/net/netfilter/nf_conntrack_proto_sctp.c
+++ b/net/netfilter/nf_conntrack_proto_sctp.c
@@ -461,7 +461,7 @@ static bool sctp_new(struct nf_conn *ct, const struct sk_buff *skb,
461 return true; 461 return true;
462} 462}
463 463
464#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 464#if IS_ENABLED(CONFIG_NF_CT_NETLINK)
465 465
466#include <linux/netfilter/nfnetlink.h> 466#include <linux/netfilter/nfnetlink.h>
467#include <linux/netfilter/nfnetlink_conntrack.h> 467#include <linux/netfilter/nfnetlink_conntrack.h>
@@ -666,7 +666,7 @@ static struct nf_conntrack_l4proto nf_conntrack_l4proto_sctp4 __read_mostly = {
666 .packet = sctp_packet, 666 .packet = sctp_packet,
667 .new = sctp_new, 667 .new = sctp_new,
668 .me = THIS_MODULE, 668 .me = THIS_MODULE,
669#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 669#if IS_ENABLED(CONFIG_NF_CT_NETLINK)
670 .to_nlattr = sctp_to_nlattr, 670 .to_nlattr = sctp_to_nlattr,
671 .nlattr_size = sctp_nlattr_size, 671 .nlattr_size = sctp_nlattr_size,
672 .from_nlattr = nlattr_to_sctp, 672 .from_nlattr = nlattr_to_sctp,
@@ -696,7 +696,7 @@ static struct nf_conntrack_l4proto nf_conntrack_l4proto_sctp6 __read_mostly = {
696 .packet = sctp_packet, 696 .packet = sctp_packet,
697 .new = sctp_new, 697 .new = sctp_new,
698 .me = THIS_MODULE, 698 .me = THIS_MODULE,
699#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 699#if IS_ENABLED(CONFIG_NF_CT_NETLINK)
700 .to_nlattr = sctp_to_nlattr, 700 .to_nlattr = sctp_to_nlattr,
701 .nlattr_size = sctp_nlattr_size, 701 .nlattr_size = sctp_nlattr_size,
702 .from_nlattr = nlattr_to_sctp, 702 .from_nlattr = nlattr_to_sctp,
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
index 8235b86b4e87..97b9f3ebf28c 100644
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -1126,7 +1126,7 @@ static bool tcp_new(struct nf_conn *ct, const struct sk_buff *skb,
1126 return true; 1126 return true;
1127} 1127}
1128 1128
1129#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 1129#if IS_ENABLED(CONFIG_NF_CT_NETLINK)
1130 1130
1131#include <linux/netfilter/nfnetlink.h> 1131#include <linux/netfilter/nfnetlink.h>
1132#include <linux/netfilter/nfnetlink_conntrack.h> 1132#include <linux/netfilter/nfnetlink_conntrack.h>
@@ -1447,7 +1447,7 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4 __read_mostly =
1447 .packet = tcp_packet, 1447 .packet = tcp_packet,
1448 .new = tcp_new, 1448 .new = tcp_new,
1449 .error = tcp_error, 1449 .error = tcp_error,
1450#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 1450#if IS_ENABLED(CONFIG_NF_CT_NETLINK)
1451 .to_nlattr = tcp_to_nlattr, 1451 .to_nlattr = tcp_to_nlattr,
1452 .nlattr_size = tcp_nlattr_size, 1452 .nlattr_size = tcp_nlattr_size,
1453 .from_nlattr = nlattr_to_tcp, 1453 .from_nlattr = nlattr_to_tcp,
@@ -1479,7 +1479,7 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp6 __read_mostly =
1479 .packet = tcp_packet, 1479 .packet = tcp_packet,
1480 .new = tcp_new, 1480 .new = tcp_new,
1481 .error = tcp_error, 1481 .error = tcp_error,
1482#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 1482#if IS_ENABLED(CONFIG_NF_CT_NETLINK)
1483 .to_nlattr = tcp_to_nlattr, 1483 .to_nlattr = tcp_to_nlattr,
1484 .nlattr_size = tcp_nlattr_size, 1484 .nlattr_size = tcp_nlattr_size,
1485 .from_nlattr = nlattr_to_tcp, 1485 .from_nlattr = nlattr_to_tcp,
diff --git a/net/netfilter/nf_conntrack_proto_udp.c b/net/netfilter/nf_conntrack_proto_udp.c
index 8289088b8218..5f35757fbff0 100644
--- a/net/netfilter/nf_conntrack_proto_udp.c
+++ b/net/netfilter/nf_conntrack_proto_udp.c
@@ -188,7 +188,7 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4 __read_mostly =
188 .packet = udp_packet, 188 .packet = udp_packet,
189 .new = udp_new, 189 .new = udp_new,
190 .error = udp_error, 190 .error = udp_error,
191#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 191#if IS_ENABLED(CONFIG_NF_CT_NETLINK)
192 .tuple_to_nlattr = nf_ct_port_tuple_to_nlattr, 192 .tuple_to_nlattr = nf_ct_port_tuple_to_nlattr,
193 .nlattr_to_tuple = nf_ct_port_nlattr_to_tuple, 193 .nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
194 .nlattr_tuple_size = nf_ct_port_nlattr_tuple_size, 194 .nlattr_tuple_size = nf_ct_port_nlattr_tuple_size,
@@ -216,7 +216,7 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_udp6 __read_mostly =
216 .packet = udp_packet, 216 .packet = udp_packet,
217 .new = udp_new, 217 .new = udp_new,
218 .error = udp_error, 218 .error = udp_error,
219#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 219#if IS_ENABLED(CONFIG_NF_CT_NETLINK)
220 .tuple_to_nlattr = nf_ct_port_tuple_to_nlattr, 220 .tuple_to_nlattr = nf_ct_port_tuple_to_nlattr,
221 .nlattr_to_tuple = nf_ct_port_nlattr_to_tuple, 221 .nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
222 .nlattr_tuple_size = nf_ct_port_nlattr_tuple_size, 222 .nlattr_tuple_size = nf_ct_port_nlattr_tuple_size,
diff --git a/net/netfilter/nf_conntrack_proto_udplite.c b/net/netfilter/nf_conntrack_proto_udplite.c
index 263b5a72588d..f52ca1181013 100644
--- a/net/netfilter/nf_conntrack_proto_udplite.c
+++ b/net/netfilter/nf_conntrack_proto_udplite.c
@@ -174,7 +174,7 @@ static struct nf_conntrack_l4proto nf_conntrack_l4proto_udplite4 __read_mostly =
174 .packet = udplite_packet, 174 .packet = udplite_packet,
175 .new = udplite_new, 175 .new = udplite_new,
176 .error = udplite_error, 176 .error = udplite_error,
177#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 177#if IS_ENABLED(CONFIG_NF_CT_NETLINK)
178 .tuple_to_nlattr = nf_ct_port_tuple_to_nlattr, 178 .tuple_to_nlattr = nf_ct_port_tuple_to_nlattr,
179 .nlattr_tuple_size = nf_ct_port_nlattr_tuple_size, 179 .nlattr_tuple_size = nf_ct_port_nlattr_tuple_size,
180 .nlattr_to_tuple = nf_ct_port_nlattr_to_tuple, 180 .nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
@@ -198,7 +198,7 @@ static struct nf_conntrack_l4proto nf_conntrack_l4proto_udplite6 __read_mostly =
198 .packet = udplite_packet, 198 .packet = udplite_packet,
199 .new = udplite_new, 199 .new = udplite_new,
200 .error = udplite_error, 200 .error = udplite_error,
201#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) 201#if IS_ENABLED(CONFIG_NF_CT_NETLINK)
202 .tuple_to_nlattr = nf_ct_port_tuple_to_nlattr, 202 .tuple_to_nlattr = nf_ct_port_tuple_to_nlattr,
203 .nlattr_tuple_size = nf_ct_port_nlattr_tuple_size, 203 .nlattr_tuple_size = nf_ct_port_nlattr_tuple_size,
204 .nlattr_to_tuple = nf_ct_port_nlattr_to_tuple, 204 .nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
diff --git a/net/netfilter/xt_NFQUEUE.c b/net/netfilter/xt_NFQUEUE.c
index d4f4b5d66b20..95237c89607a 100644
--- a/net/netfilter/xt_NFQUEUE.c
+++ b/net/netfilter/xt_NFQUEUE.c
@@ -49,7 +49,7 @@ static u32 hash_v4(const struct sk_buff *skb)
49 return jhash_2words((__force u32)ipaddr, iph->protocol, jhash_initval); 49 return jhash_2words((__force u32)ipaddr, iph->protocol, jhash_initval);
50} 50}
51 51
52#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 52#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
53static u32 hash_v6(const struct sk_buff *skb) 53static u32 hash_v6(const struct sk_buff *skb)
54{ 54{
55 const struct ipv6hdr *ip6h = ipv6_hdr(skb); 55 const struct ipv6hdr *ip6h = ipv6_hdr(skb);
@@ -74,7 +74,7 @@ nfqueue_tg_v1(struct sk_buff *skb, const struct xt_action_param *par)
74 if (par->family == NFPROTO_IPV4) 74 if (par->family == NFPROTO_IPV4)
75 queue = (((u64) hash_v4(skb) * info->queues_total) >> 75 queue = (((u64) hash_v4(skb) * info->queues_total) >>
76 32) + queue; 76 32) + queue;
77#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 77#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
78 else if (par->family == NFPROTO_IPV6) 78 else if (par->family == NFPROTO_IPV6)
79 queue = (((u64) hash_v6(skb) * info->queues_total) >> 79 queue = (((u64) hash_v6(skb) * info->queues_total) >>
80 32) + queue; 80 32) + queue;
diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c
index ba722621ed25..190ad37c5cf8 100644
--- a/net/netfilter/xt_TCPMSS.c
+++ b/net/netfilter/xt_TCPMSS.c
@@ -198,7 +198,7 @@ tcpmss_tg4(struct sk_buff *skb, const struct xt_action_param *par)
198 return XT_CONTINUE; 198 return XT_CONTINUE;
199} 199}
200 200
201#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 201#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
202static unsigned int 202static unsigned int
203tcpmss_tg6(struct sk_buff *skb, const struct xt_action_param *par) 203tcpmss_tg6(struct sk_buff *skb, const struct xt_action_param *par)
204{ 204{
@@ -260,7 +260,7 @@ static int tcpmss_tg4_check(const struct xt_tgchk_param *par)
260 return -EINVAL; 260 return -EINVAL;
261} 261}
262 262
263#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 263#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
264static int tcpmss_tg6_check(const struct xt_tgchk_param *par) 264static int tcpmss_tg6_check(const struct xt_tgchk_param *par)
265{ 265{
266 const struct xt_tcpmss_info *info = par->targinfo; 266 const struct xt_tcpmss_info *info = par->targinfo;
@@ -293,7 +293,7 @@ static struct xt_target tcpmss_tg_reg[] __read_mostly = {
293 .proto = IPPROTO_TCP, 293 .proto = IPPROTO_TCP,
294 .me = THIS_MODULE, 294 .me = THIS_MODULE,
295 }, 295 },
296#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 296#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
297 { 297 {
298 .family = NFPROTO_IPV6, 298 .family = NFPROTO_IPV6,
299 .name = "TCPMSS", 299 .name = "TCPMSS",
diff --git a/net/netfilter/xt_TCPOPTSTRIP.c b/net/netfilter/xt_TCPOPTSTRIP.c
index 3a295cc734bd..25fd1c4e1eec 100644
--- a/net/netfilter/xt_TCPOPTSTRIP.c
+++ b/net/netfilter/xt_TCPOPTSTRIP.c
@@ -80,7 +80,7 @@ tcpoptstrip_tg4(struct sk_buff *skb, const struct xt_action_param *par)
80 sizeof(struct iphdr) + sizeof(struct tcphdr)); 80 sizeof(struct iphdr) + sizeof(struct tcphdr));
81} 81}
82 82
83#if defined(CONFIG_IP6_NF_MANGLE) || defined(CONFIG_IP6_NF_MANGLE_MODULE) 83#if IS_ENABLED(CONFIG_IP6_NF_MANGLE)
84static unsigned int 84static unsigned int
85tcpoptstrip_tg6(struct sk_buff *skb, const struct xt_action_param *par) 85tcpoptstrip_tg6(struct sk_buff *skb, const struct xt_action_param *par)
86{ 86{
@@ -109,7 +109,7 @@ static struct xt_target tcpoptstrip_tg_reg[] __read_mostly = {
109 .targetsize = sizeof(struct xt_tcpoptstrip_target_info), 109 .targetsize = sizeof(struct xt_tcpoptstrip_target_info),
110 .me = THIS_MODULE, 110 .me = THIS_MODULE,
111 }, 111 },
112#if defined(CONFIG_IP6_NF_MANGLE) || defined(CONFIG_IP6_NF_MANGLE_MODULE) 112#if IS_ENABLED(CONFIG_IP6_NF_MANGLE)
113 { 113 {
114 .name = "TCPOPTSTRIP", 114 .name = "TCPOPTSTRIP",
115 .family = NFPROTO_IPV6, 115 .family = NFPROTO_IPV6,
diff --git a/net/netfilter/xt_TEE.c b/net/netfilter/xt_TEE.c
index 68349c31083c..3aae66facf9f 100644
--- a/net/netfilter/xt_TEE.c
+++ b/net/netfilter/xt_TEE.c
@@ -25,7 +25,7 @@
25#include <linux/netfilter/x_tables.h> 25#include <linux/netfilter/x_tables.h>
26#include <linux/netfilter/xt_TEE.h> 26#include <linux/netfilter/xt_TEE.h>
27 27
28#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 28#if IS_ENABLED(CONFIG_NF_CONNTRACK)
29# define WITH_CONNTRACK 1 29# define WITH_CONNTRACK 1
30# include <net/netfilter/nf_conntrack.h> 30# include <net/netfilter/nf_conntrack.h>
31#endif 31#endif
diff --git a/net/netfilter/xt_TPROXY.c b/net/netfilter/xt_TPROXY.c
index dcfd57eb9d02..35a959a096e0 100644
--- a/net/netfilter/xt_TPROXY.c
+++ b/net/netfilter/xt_TPROXY.c
@@ -22,7 +22,7 @@
22 22
23#include <net/netfilter/ipv4/nf_defrag_ipv4.h> 23#include <net/netfilter/ipv4/nf_defrag_ipv4.h>
24 24
25#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 25#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
26#define XT_TPROXY_HAVE_IPV6 1 26#define XT_TPROXY_HAVE_IPV6 1
27#include <net/if_inet6.h> 27#include <net/if_inet6.h>
28#include <net/addrconf.h> 28#include <net/addrconf.h>
diff --git a/net/netfilter/xt_addrtype.c b/net/netfilter/xt_addrtype.c
index c047de2046ad..49c5ff7f6dd6 100644
--- a/net/netfilter/xt_addrtype.c
+++ b/net/netfilter/xt_addrtype.c
@@ -16,7 +16,7 @@
16#include <linux/ip.h> 16#include <linux/ip.h>
17#include <net/route.h> 17#include <net/route.h>
18 18
19#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 19#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
20#include <net/ipv6.h> 20#include <net/ipv6.h>
21#include <net/ip6_route.h> 21#include <net/ip6_route.h>
22#include <net/ip6_fib.h> 22#include <net/ip6_fib.h>
@@ -31,7 +31,7 @@ MODULE_DESCRIPTION("Xtables: address type match");
31MODULE_ALIAS("ipt_addrtype"); 31MODULE_ALIAS("ipt_addrtype");
32MODULE_ALIAS("ip6t_addrtype"); 32MODULE_ALIAS("ip6t_addrtype");
33 33
34#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 34#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
35static u32 match_lookup_rt6(struct net *net, const struct net_device *dev, 35static u32 match_lookup_rt6(struct net *net, const struct net_device *dev,
36 const struct in6_addr *addr) 36 const struct in6_addr *addr)
37{ 37{
@@ -149,7 +149,7 @@ addrtype_mt_v1(const struct sk_buff *skb, struct xt_action_param *par)
149 else if (info->flags & XT_ADDRTYPE_LIMIT_IFACE_OUT) 149 else if (info->flags & XT_ADDRTYPE_LIMIT_IFACE_OUT)
150 dev = par->out; 150 dev = par->out;
151 151
152#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 152#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
153 if (par->family == NFPROTO_IPV6) 153 if (par->family == NFPROTO_IPV6)
154 return addrtype_mt6(net, dev, skb, info); 154 return addrtype_mt6(net, dev, skb, info);
155#endif 155#endif
@@ -190,7 +190,7 @@ static int addrtype_mt_checkentry_v1(const struct xt_mtchk_param *par)
190 return -EINVAL; 190 return -EINVAL;
191 } 191 }
192 192
193#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 193#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
194 if (par->family == NFPROTO_IPV6) { 194 if (par->family == NFPROTO_IPV6) {
195 if ((info->source | info->dest) & XT_ADDRTYPE_BLACKHOLE) { 195 if ((info->source | info->dest) & XT_ADDRTYPE_BLACKHOLE) {
196 pr_err("ipv6 BLACKHOLE matching not supported\n"); 196 pr_err("ipv6 BLACKHOLE matching not supported\n");
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index 068698f64791..8e4992101875 100644
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -21,7 +21,7 @@
21#include <linux/mm.h> 21#include <linux/mm.h>
22#include <linux/in.h> 22#include <linux/in.h>
23#include <linux/ip.h> 23#include <linux/ip.h>
24#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 24#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
25#include <linux/ipv6.h> 25#include <linux/ipv6.h>
26#include <net/ipv6.h> 26#include <net/ipv6.h>
27#endif 27#endif
@@ -64,7 +64,7 @@ struct dsthash_dst {
64 __be32 src; 64 __be32 src;
65 __be32 dst; 65 __be32 dst;
66 } ip; 66 } ip;
67#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 67#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
68 struct { 68 struct {
69 __be32 src[4]; 69 __be32 src[4];
70 __be32 dst[4]; 70 __be32 dst[4];
@@ -413,7 +413,7 @@ static inline __be32 maskl(__be32 a, unsigned int l)
413 return l ? htonl(ntohl(a) & ~0 << (32 - l)) : 0; 413 return l ? htonl(ntohl(a) & ~0 << (32 - l)) : 0;
414} 414}
415 415
416#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 416#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
417static void hashlimit_ipv6_mask(__be32 *i, unsigned int p) 417static void hashlimit_ipv6_mask(__be32 *i, unsigned int p)
418{ 418{
419 switch (p) { 419 switch (p) {
@@ -464,7 +464,7 @@ hashlimit_init_dst(const struct xt_hashlimit_htable *hinfo,
464 return 0; 464 return 0;
465 nexthdr = ip_hdr(skb)->protocol; 465 nexthdr = ip_hdr(skb)->protocol;
466 break; 466 break;
467#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 467#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
468 case NFPROTO_IPV6: 468 case NFPROTO_IPV6:
469 if (hinfo->cfg.mode & XT_HASHLIMIT_HASH_DIP) { 469 if (hinfo->cfg.mode & XT_HASHLIMIT_HASH_DIP) {
470 memcpy(&dst->ip6.dst, &ipv6_hdr(skb)->daddr, 470 memcpy(&dst->ip6.dst, &ipv6_hdr(skb)->daddr,
@@ -616,7 +616,7 @@ static struct xt_match hashlimit_mt_reg[] __read_mostly = {
616 .destroy = hashlimit_mt_destroy, 616 .destroy = hashlimit_mt_destroy,
617 .me = THIS_MODULE, 617 .me = THIS_MODULE,
618 }, 618 },
619#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 619#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
620 { 620 {
621 .name = "hashlimit", 621 .name = "hashlimit",
622 .revision = 1, 622 .revision = 1,
@@ -693,7 +693,7 @@ static int dl_seq_real_show(struct dsthash_ent *ent, u_int8_t family,
693 ent->rateinfo.credit, ent->rateinfo.credit_cap, 693 ent->rateinfo.credit, ent->rateinfo.credit_cap,
694 ent->rateinfo.cost); 694 ent->rateinfo.cost);
695 break; 695 break;
696#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 696#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
697 case NFPROTO_IPV6: 697 case NFPROTO_IPV6:
698 res = seq_printf(s, "%ld %pI6:%u->%pI6:%u %u %u %u\n", 698 res = seq_printf(s, "%ld %pI6:%u->%pI6:%u %u %u %u\n",
699 (long)(ent->expires - jiffies)/HZ, 699 (long)(ent->expires - jiffies)/HZ,
@@ -761,7 +761,7 @@ static int __net_init hashlimit_proc_net_init(struct net *net)
761 hashlimit_net->ipt_hashlimit = proc_mkdir("ipt_hashlimit", net->proc_net); 761 hashlimit_net->ipt_hashlimit = proc_mkdir("ipt_hashlimit", net->proc_net);
762 if (!hashlimit_net->ipt_hashlimit) 762 if (!hashlimit_net->ipt_hashlimit)
763 return -ENOMEM; 763 return -ENOMEM;
764#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 764#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
765 hashlimit_net->ip6t_hashlimit = proc_mkdir("ip6t_hashlimit", net->proc_net); 765 hashlimit_net->ip6t_hashlimit = proc_mkdir("ip6t_hashlimit", net->proc_net);
766 if (!hashlimit_net->ip6t_hashlimit) { 766 if (!hashlimit_net->ip6t_hashlimit) {
767 proc_net_remove(net, "ipt_hashlimit"); 767 proc_net_remove(net, "ipt_hashlimit");
@@ -774,7 +774,7 @@ static int __net_init hashlimit_proc_net_init(struct net *net)
774static void __net_exit hashlimit_proc_net_exit(struct net *net) 774static void __net_exit hashlimit_proc_net_exit(struct net *net)
775{ 775{
776 proc_net_remove(net, "ipt_hashlimit"); 776 proc_net_remove(net, "ipt_hashlimit");
777#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 777#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
778 proc_net_remove(net, "ip6t_hashlimit"); 778 proc_net_remove(net, "ip6t_hashlimit");
779#endif 779#endif
780} 780}
diff --git a/net/netfilter/xt_socket.c b/net/netfilter/xt_socket.c
index c302e30dc50c..72bb07f57f97 100644
--- a/net/netfilter/xt_socket.c
+++ b/net/netfilter/xt_socket.c
@@ -22,7 +22,7 @@
22#include <net/netfilter/nf_tproxy_core.h> 22#include <net/netfilter/nf_tproxy_core.h>
23#include <net/netfilter/ipv4/nf_defrag_ipv4.h> 23#include <net/netfilter/ipv4/nf_defrag_ipv4.h>
24 24
25#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) 25#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
26#define XT_SOCKET_HAVE_IPV6 1 26#define XT_SOCKET_HAVE_IPV6 1
27#include <linux/netfilter_ipv6/ip6_tables.h> 27#include <linux/netfilter_ipv6/ip6_tables.h>
28#include <net/netfilter/ipv6/nf_defrag_ipv6.h> 28#include <net/netfilter/ipv6/nf_defrag_ipv6.h>
@@ -30,7 +30,7 @@
30 30
31#include <linux/netfilter/xt_socket.h> 31#include <linux/netfilter/xt_socket.h>
32 32
33#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 33#if IS_ENABLED(CONFIG_NF_CONNTRACK)
34#define XT_SOCKET_HAVE_CONNTRACK 1 34#define XT_SOCKET_HAVE_CONNTRACK 1
35#include <net/netfilter/nf_conntrack.h> 35#include <net/netfilter/nf_conntrack.h>
36#endif 36#endif