net:core: 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>
This commit is contained in:
Родитель
ecedb6ae90
Коммит
a3bf7ae9ae
|
@ -134,7 +134,7 @@ u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport)
|
||||||
EXPORT_SYMBOL_GPL(secure_ipv4_port_ephemeral);
|
EXPORT_SYMBOL_GPL(secure_ipv4_port_ephemeral);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_IP_DCCP) || defined(CONFIG_IP_DCCP_MODULE)
|
#if IS_ENABLED(CONFIG_IP_DCCP)
|
||||||
u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr,
|
u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr,
|
||||||
__be16 sport, __be16 dport)
|
__be16 sport, __be16 dport)
|
||||||
{
|
{
|
||||||
|
|
|
@ -452,7 +452,7 @@ static void skb_release_head_state(struct sk_buff *skb)
|
||||||
WARN_ON(in_irq());
|
WARN_ON(in_irq());
|
||||||
skb->destructor(skb);
|
skb->destructor(skb);
|
||||||
}
|
}
|
||||||
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
|
#if IS_ENABLED(CONFIG_NF_CONNTRACK)
|
||||||
nf_conntrack_put(skb->nfct);
|
nf_conntrack_put(skb->nfct);
|
||||||
#endif
|
#endif
|
||||||
#ifdef NET_SKBUFF_NF_DEFRAG_NEEDED
|
#ifdef NET_SKBUFF_NF_DEFRAG_NEEDED
|
||||||
|
@ -602,15 +602,14 @@ static void __copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
|
||||||
new->ip_summed = old->ip_summed;
|
new->ip_summed = old->ip_summed;
|
||||||
skb_copy_queue_mapping(new, old);
|
skb_copy_queue_mapping(new, old);
|
||||||
new->priority = old->priority;
|
new->priority = old->priority;
|
||||||
#if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE)
|
#if IS_ENABLED(CONFIG_IP_VS)
|
||||||
new->ipvs_property = old->ipvs_property;
|
new->ipvs_property = old->ipvs_property;
|
||||||
#endif
|
#endif
|
||||||
new->protocol = old->protocol;
|
new->protocol = old->protocol;
|
||||||
new->mark = old->mark;
|
new->mark = old->mark;
|
||||||
new->skb_iif = old->skb_iif;
|
new->skb_iif = old->skb_iif;
|
||||||
__nf_copy(new, old);
|
__nf_copy(new, old);
|
||||||
#if defined(CONFIG_NETFILTER_XT_TARGET_TRACE) || \
|
#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE)
|
||||||
defined(CONFIG_NETFILTER_XT_TARGET_TRACE_MODULE)
|
|
||||||
new->nf_trace = old->nf_trace;
|
new->nf_trace = old->nf_trace;
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_NET_SCHED
|
#ifdef CONFIG_NET_SCHED
|
||||||
|
|
Загрузка…
Ссылка в новой задаче