diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-12-10 04:48:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-11 18:25:16 -0500 |
commit | dfd56b8b38fff3586f36232db58e1e9f7885a605 (patch) | |
tree | 64c7142ebf4625939f68bd3603f1d37bacb20a73 /net/ipv4/inet_diag.c | |
parent | 1ded132d4c3442aa3a619c94c245d7b5e0eb9731 (diff) |
net: use IS_ENABLED(CONFIG_IPV6)
Instead of testing defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/inet_diag.c')
-rw-r--r-- | net/ipv4/inet_diag.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index 9b3e0b179cd2..575e28c57cc9 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c | |||
@@ -116,7 +116,7 @@ int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk, | |||
116 | if (ext & (1 << (INET_DIAG_TOS - 1))) | 116 | if (ext & (1 << (INET_DIAG_TOS - 1))) |
117 | RTA_PUT_U8(skb, INET_DIAG_TOS, inet->tos); | 117 | RTA_PUT_U8(skb, INET_DIAG_TOS, inet->tos); |
118 | 118 | ||
119 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) | 119 | #if IS_ENABLED(CONFIG_IPV6) |
120 | if (r->idiag_family == AF_INET6) { | 120 | if (r->idiag_family == AF_INET6) { |
121 | const struct ipv6_pinfo *np = inet6_sk(sk); | 121 | const struct ipv6_pinfo *np = inet6_sk(sk); |
122 | 122 | ||
@@ -234,7 +234,7 @@ static int inet_twsk_diag_fill(struct inet_timewait_sock *tw, | |||
234 | r->idiag_wqueue = 0; | 234 | r->idiag_wqueue = 0; |
235 | r->idiag_uid = 0; | 235 | r->idiag_uid = 0; |
236 | r->idiag_inode = 0; | 236 | r->idiag_inode = 0; |
237 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) | 237 | #if IS_ENABLED(CONFIG_IPV6) |
238 | if (tw->tw_family == AF_INET6) { | 238 | if (tw->tw_family == AF_INET6) { |
239 | const struct inet6_timewait_sock *tw6 = | 239 | const struct inet6_timewait_sock *tw6 = |
240 | inet6_twsk((struct sock *)tw); | 240 | inet6_twsk((struct sock *)tw); |
@@ -286,7 +286,7 @@ int inet_diag_dump_one_icsk(struct inet_hashinfo *hashinfo, struct sk_buff *in_s | |||
286 | req->id.idiag_dport, req->id.idiag_src[0], | 286 | req->id.idiag_dport, req->id.idiag_src[0], |
287 | req->id.idiag_sport, req->id.idiag_if); | 287 | req->id.idiag_sport, req->id.idiag_if); |
288 | } | 288 | } |
289 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) | 289 | #if IS_ENABLED(CONFIG_IPV6) |
290 | else if (req->sdiag_family == AF_INET6) { | 290 | else if (req->sdiag_family == AF_INET6) { |
291 | sk = inet6_lookup(&init_net, hashinfo, | 291 | sk = inet6_lookup(&init_net, hashinfo, |
292 | (struct in6_addr *)req->id.idiag_dst, | 292 | (struct in6_addr *)req->id.idiag_dst, |
@@ -473,7 +473,7 @@ int inet_diag_bc_sk(const struct nlattr *bc, struct sock *sk) | |||
473 | return 1; | 473 | return 1; |
474 | 474 | ||
475 | entry.family = sk->sk_family; | 475 | entry.family = sk->sk_family; |
476 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) | 476 | #if IS_ENABLED(CONFIG_IPV6) |
477 | if (entry.family == AF_INET6) { | 477 | if (entry.family == AF_INET6) { |
478 | struct ipv6_pinfo *np = inet6_sk(sk); | 478 | struct ipv6_pinfo *np = inet6_sk(sk); |
479 | 479 | ||
@@ -571,7 +571,7 @@ static int inet_twsk_diag_dump(struct inet_timewait_sock *tw, | |||
571 | struct inet_diag_entry entry; | 571 | struct inet_diag_entry entry; |
572 | 572 | ||
573 | entry.family = tw->tw_family; | 573 | entry.family = tw->tw_family; |
574 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) | 574 | #if IS_ENABLED(CONFIG_IPV6) |
575 | if (tw->tw_family == AF_INET6) { | 575 | if (tw->tw_family == AF_INET6) { |
576 | struct inet6_timewait_sock *tw6 = | 576 | struct inet6_timewait_sock *tw6 = |
577 | inet6_twsk((struct sock *)tw); | 577 | inet6_twsk((struct sock *)tw); |
@@ -633,7 +633,7 @@ static int inet_diag_fill_req(struct sk_buff *skb, struct sock *sk, | |||
633 | r->idiag_wqueue = 0; | 633 | r->idiag_wqueue = 0; |
634 | r->idiag_uid = sock_i_uid(sk); | 634 | r->idiag_uid = sock_i_uid(sk); |
635 | r->idiag_inode = 0; | 635 | r->idiag_inode = 0; |
636 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) | 636 | #if IS_ENABLED(CONFIG_IPV6) |
637 | if (r->idiag_family == AF_INET6) { | 637 | if (r->idiag_family == AF_INET6) { |
638 | *(struct in6_addr *)r->id.idiag_src = inet6_rsk(req)->loc_addr; | 638 | *(struct in6_addr *)r->id.idiag_src = inet6_rsk(req)->loc_addr; |
639 | *(struct in6_addr *)r->id.idiag_dst = inet6_rsk(req)->rmt_addr; | 639 | *(struct in6_addr *)r->id.idiag_dst = inet6_rsk(req)->rmt_addr; |
@@ -695,13 +695,13 @@ static int inet_diag_dump_reqs(struct sk_buff *skb, struct sock *sk, | |||
695 | 695 | ||
696 | if (bc) { | 696 | if (bc) { |
697 | entry.saddr = | 697 | entry.saddr = |
698 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) | 698 | #if IS_ENABLED(CONFIG_IPV6) |
699 | (entry.family == AF_INET6) ? | 699 | (entry.family == AF_INET6) ? |
700 | inet6_rsk(req)->loc_addr.s6_addr32 : | 700 | inet6_rsk(req)->loc_addr.s6_addr32 : |
701 | #endif | 701 | #endif |
702 | &ireq->loc_addr; | 702 | &ireq->loc_addr; |
703 | entry.daddr = | 703 | entry.daddr = |
704 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) | 704 | #if IS_ENABLED(CONFIG_IPV6) |
705 | (entry.family == AF_INET6) ? | 705 | (entry.family == AF_INET6) ? |
706 | inet6_rsk(req)->rmt_addr.s6_addr32 : | 706 | inet6_rsk(req)->rmt_addr.s6_addr32 : |
707 | #endif | 707 | #endif |