Skip to content

Commit 25d7cbc

Browse files
a3a3elummakynes
authored andcommitted
netfilter: replace defined(CONFIG...) || defined(CONFIG...MODULE) with IS_ENABLED(CONFIG...).
A few headers contain instances of: #if defined(CONFIG_XXX) or defined(CONFIG_XXX_MODULE) Replace them with: #if IS_ENABLED(CONFIG_XXX) Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent 16b26cd commit 25d7cbc

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎include/linux/netfilter.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family)
422422
}
423423
#endif /*CONFIG_NETFILTER*/
424424

425-
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
425+
#if IS_ENABLED(CONFIG_NF_CONNTRACK)
426426
#include <linux/netfilter/nf_conntrack_zones_common.h>
427427

428428
extern void (*ip_ct_attach)(struct sk_buff *, const struct sk_buff *) __rcu;

‎include/linux/netfilter/ipset/ip_set_getport.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
extern bool ip_set_get_ip4_port(const struct sk_buff *skb, bool src,
1010
__be16 *port, u8 *proto);
1111

12-
#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
12+
#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
1313
extern bool ip_set_get_ip6_port(const struct sk_buff *skb, bool src,
1414
__be16 *port, u8 *proto);
1515
#else

‎include/net/netfilter/nf_conntrack_extend.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
enum nf_ct_ext_id {
1010
NF_CT_EXT_HELPER,
11-
#if defined(CONFIG_NF_NAT) || defined(CONFIG_NF_NAT_MODULE)
11+
#if IS_ENABLED(CONFIG_NF_NAT)
1212
NF_CT_EXT_NAT,
1313
#endif
1414
NF_CT_EXT_SEQADJ,

‎include/net/netfilter/nf_nat.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ enum nf_nat_manip_type {
2222
/* per conntrack: nat application helper private data */
2323
union nf_conntrack_nat_help {
2424
/* insert nat helper private data here */
25-
#if defined(CONFIG_NF_NAT_PPTP) || defined(CONFIG_NF_NAT_PPTP_MODULE)
25+
#if IS_ENABLED(CONFIG_NF_NAT_PPTP)
2626
struct nf_nat_pptp nat_pptp_info;
2727
#endif
2828
};
@@ -47,7 +47,7 @@ struct nf_conn_nat *nf_ct_nat_ext_add(struct nf_conn *ct);
4747

4848
static inline struct nf_conn_nat *nfct_nat(const struct nf_conn *ct)
4949
{
50-
#if defined(CONFIG_NF_NAT) || defined(CONFIG_NF_NAT_MODULE)
50+
#if IS_ENABLED(CONFIG_NF_NAT)
5151
return nf_ct_ext_find(ct, NF_CT_EXT_NAT);
5252
#else
5353
return NULL;

0 commit comments

Comments
 (0)