aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/exthdrs.c
diff options
context:
space:
mode:
authorAmerigo Wang <amwang@redhat.com>2012-10-29 12:23:10 -0400
committerDavid S. Miller <davem@davemloft.net>2012-11-01 12:41:35 -0400
commit07a936260a94ae4798527ce8f79d4f3b589ab8a3 (patch)
treebf8ff84c3045cd3b8b2b2970a6c7491439172939 /net/ipv6/exthdrs.c
parentcc535dfb6a85b42218307c43f60668d7bd6f4318 (diff)
ipv6: use IS_ENABLED()
#if defined(CONFIG_FOO) || defined(CONFIG_FOO_MODULE) can be replaced by #if IS_ENABLED(CONFIG_FOO) Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/exthdrs.c')
-rw-r--r--net/ipv6/exthdrs.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index fa3d9c328092..f005acc58b2a 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -43,7 +43,7 @@
43#include <net/ndisc.h> 43#include <net/ndisc.h>
44#include <net/ip6_route.h> 44#include <net/ip6_route.h>
45#include <net/addrconf.h> 45#include <net/addrconf.h>
46#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) 46#if IS_ENABLED(CONFIG_IPV6_MIP6)
47#include <net/xfrm.h> 47#include <net/xfrm.h>
48#endif 48#endif
49 49
@@ -224,7 +224,7 @@ bad:
224 Destination options header. 224 Destination options header.
225 *****************************/ 225 *****************************/
226 226
227#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) 227#if IS_ENABLED(CONFIG_IPV6_MIP6)
228static bool ipv6_dest_hao(struct sk_buff *skb, int optoff) 228static bool ipv6_dest_hao(struct sk_buff *skb, int optoff)
229{ 229{
230 struct ipv6_destopt_hao *hao; 230 struct ipv6_destopt_hao *hao;
@@ -288,7 +288,7 @@ static bool ipv6_dest_hao(struct sk_buff *skb, int optoff)
288#endif 288#endif
289 289
290static const struct tlvtype_proc tlvprocdestopt_lst[] = { 290static const struct tlvtype_proc tlvprocdestopt_lst[] = {
291#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) 291#if IS_ENABLED(CONFIG_IPV6_MIP6)
292 { 292 {
293 .type = IPV6_TLV_HAO, 293 .type = IPV6_TLV_HAO,
294 .func = ipv6_dest_hao, 294 .func = ipv6_dest_hao,
@@ -300,7 +300,7 @@ static const struct tlvtype_proc tlvprocdestopt_lst[] = {
300static int ipv6_destopt_rcv(struct sk_buff *skb) 300static int ipv6_destopt_rcv(struct sk_buff *skb)
301{ 301{
302 struct inet6_skb_parm *opt = IP6CB(skb); 302 struct inet6_skb_parm *opt = IP6CB(skb);
303#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) 303#if IS_ENABLED(CONFIG_IPV6_MIP6)
304 __u16 dstbuf; 304 __u16 dstbuf;
305#endif 305#endif
306 struct dst_entry *dst = skb_dst(skb); 306 struct dst_entry *dst = skb_dst(skb);
@@ -315,14 +315,14 @@ static int ipv6_destopt_rcv(struct sk_buff *skb)
315 } 315 }
316 316
317 opt->lastopt = opt->dst1 = skb_network_header_len(skb); 317 opt->lastopt = opt->dst1 = skb_network_header_len(skb);
318#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) 318#if IS_ENABLED(CONFIG_IPV6_MIP6)
319 dstbuf = opt->dst1; 319 dstbuf = opt->dst1;
320#endif 320#endif
321 321
322 if (ip6_parse_tlv(tlvprocdestopt_lst, skb)) { 322 if (ip6_parse_tlv(tlvprocdestopt_lst, skb)) {
323 skb->transport_header += (skb_transport_header(skb)[1] + 1) << 3; 323 skb->transport_header += (skb_transport_header(skb)[1] + 1) << 3;
324 opt = IP6CB(skb); 324 opt = IP6CB(skb);
325#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) 325#if IS_ENABLED(CONFIG_IPV6_MIP6)
326 opt->nhoff = dstbuf; 326 opt->nhoff = dstbuf;
327#else 327#else
328 opt->nhoff = opt->dst1; 328 opt->nhoff = opt->dst1;
@@ -378,7 +378,7 @@ static int ipv6_rthdr_rcv(struct sk_buff *skb)
378looped_back: 378looped_back:
379 if (hdr->segments_left == 0) { 379 if (hdr->segments_left == 0) {
380 switch (hdr->type) { 380 switch (hdr->type) {
381#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) 381#if IS_ENABLED(CONFIG_IPV6_MIP6)
382 case IPV6_SRCRT_TYPE_2: 382 case IPV6_SRCRT_TYPE_2:
383 /* Silently discard type 2 header unless it was 383 /* Silently discard type 2 header unless it was
384 * processed by own 384 * processed by own
@@ -404,7 +404,7 @@ looped_back:
404 } 404 }
405 405
406 switch (hdr->type) { 406 switch (hdr->type) {
407#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) 407#if IS_ENABLED(CONFIG_IPV6_MIP6)
408 case IPV6_SRCRT_TYPE_2: 408 case IPV6_SRCRT_TYPE_2:
409 if (accept_source_route < 0) 409 if (accept_source_route < 0)
410 goto unknown_rh; 410 goto unknown_rh;
@@ -461,7 +461,7 @@ looped_back:
461 addr += i - 1; 461 addr += i - 1;
462 462
463 switch (hdr->type) { 463 switch (hdr->type) {
464#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) 464#if IS_ENABLED(CONFIG_IPV6_MIP6)
465 case IPV6_SRCRT_TYPE_2: 465 case IPV6_SRCRT_TYPE_2:
466 if (xfrm6_input_addr(skb, (xfrm_address_t *)addr, 466 if (xfrm6_input_addr(skb, (xfrm_address_t *)addr,
467 (xfrm_address_t *)&ipv6_hdr(skb)->saddr, 467 (xfrm_address_t *)&ipv6_hdr(skb)->saddr,