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/ip_gre.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/ip_gre.c')
-rw-r--r-- | net/ipv4/ip_gre.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index fe070c1593ab..2b53a1f7abf6 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #include <net/rtnetlink.h> | 46 | #include <net/rtnetlink.h> |
47 | #include <net/gre.h> | 47 | #include <net/gre.h> |
48 | 48 | ||
49 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 49 | #if IS_ENABLED(CONFIG_IPV6) |
50 | #include <net/ipv6.h> | 50 | #include <net/ipv6.h> |
51 | #include <net/ip6_fib.h> | 51 | #include <net/ip6_fib.h> |
52 | #include <net/ip6_route.h> | 52 | #include <net/ip6_route.h> |
@@ -729,7 +729,7 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev | |||
729 | if ((dst = rt->rt_gateway) == 0) | 729 | if ((dst = rt->rt_gateway) == 0) |
730 | goto tx_error_icmp; | 730 | goto tx_error_icmp; |
731 | } | 731 | } |
732 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 732 | #if IS_ENABLED(CONFIG_IPV6) |
733 | else if (skb->protocol == htons(ETH_P_IPV6)) { | 733 | else if (skb->protocol == htons(ETH_P_IPV6)) { |
734 | struct neighbour *neigh = dst_get_neighbour_noref(skb_dst(skb)); | 734 | struct neighbour *neigh = dst_get_neighbour_noref(skb_dst(skb)); |
735 | const struct in6_addr *addr6; | 735 | const struct in6_addr *addr6; |
@@ -799,7 +799,7 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev | |||
799 | goto tx_error; | 799 | goto tx_error; |
800 | } | 800 | } |
801 | } | 801 | } |
802 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 802 | #if IS_ENABLED(CONFIG_IPV6) |
803 | else if (skb->protocol == htons(ETH_P_IPV6)) { | 803 | else if (skb->protocol == htons(ETH_P_IPV6)) { |
804 | struct rt6_info *rt6 = (struct rt6_info *)skb_dst(skb); | 804 | struct rt6_info *rt6 = (struct rt6_info *)skb_dst(skb); |
805 | 805 | ||
@@ -875,7 +875,7 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev | |||
875 | if ((iph->ttl = tiph->ttl) == 0) { | 875 | if ((iph->ttl = tiph->ttl) == 0) { |
876 | if (skb->protocol == htons(ETH_P_IP)) | 876 | if (skb->protocol == htons(ETH_P_IP)) |
877 | iph->ttl = old_iph->ttl; | 877 | iph->ttl = old_iph->ttl; |
878 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 878 | #if IS_ENABLED(CONFIG_IPV6) |
879 | else if (skb->protocol == htons(ETH_P_IPV6)) | 879 | else if (skb->protocol == htons(ETH_P_IPV6)) |
880 | iph->ttl = ((const struct ipv6hdr *)old_iph)->hop_limit; | 880 | iph->ttl = ((const struct ipv6hdr *)old_iph)->hop_limit; |
881 | #endif | 881 | #endif |