aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahide NAKAMURA <nakam@linux-ipv6.org>2007-06-27 02:51:41 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-11 01:15:41 -0400
commit136ebf08b46f839e2dc9db34322b654e5d9b9936 (patch)
tree6a38a3c546def150ff73effcf4afd9c55881f49c
parent2371baa4bdab3268b32009926f75e7a5d3a41506 (diff)
[IPV6] MIP6: Kill unnecessary ifdefs.
Kill unnecessary CONFIG_IPV6_MIP6. o It is redundant for RAW socket to keep MH out with the config then it can handle any protocol. o Clean-up at AH. Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/flow.h4
-rw-r--r--include/net/xfrm.h2
-rw-r--r--net/ipv6/ah6.c4
-rw-r--r--net/ipv6/raw.c4
4 files changed, 2 insertions, 12 deletions
diff --git a/include/net/flow.h b/include/net/flow.h
index f3cc1f812619..af59fa5cc1f8 100644
--- a/include/net/flow.h
+++ b/include/net/flow.h
@@ -67,20 +67,16 @@ struct flowi {
67 67
68 __be32 spi; 68 __be32 spi;
69 69
70#ifdef CONFIG_IPV6_MIP6
71 struct { 70 struct {
72 __u8 type; 71 __u8 type;
73 } mht; 72 } mht;
74#endif
75 } uli_u; 73 } uli_u;
76#define fl_ip_sport uli_u.ports.sport 74#define fl_ip_sport uli_u.ports.sport
77#define fl_ip_dport uli_u.ports.dport 75#define fl_ip_dport uli_u.ports.dport
78#define fl_icmp_type uli_u.icmpt.type 76#define fl_icmp_type uli_u.icmpt.type
79#define fl_icmp_code uli_u.icmpt.code 77#define fl_icmp_code uli_u.icmpt.code
80#define fl_ipsec_spi uli_u.spi 78#define fl_ipsec_spi uli_u.spi
81#ifdef CONFIG_IPV6_MIP6
82#define fl_mh_type uli_u.mht.type 79#define fl_mh_type uli_u.mht.type
83#endif
84 __u32 secid; /* used by xfrm; see secid.txt */ 80 __u32 secid; /* used by xfrm; see secid.txt */
85} __attribute__((__aligned__(BITS_PER_LONG/8))); 81} __attribute__((__aligned__(BITS_PER_LONG/8)));
86 82
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 311f25af5e1a..7720c1182bb4 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -509,11 +509,9 @@ __be16 xfrm_flowi_sport(struct flowi *fl)
509 case IPPROTO_ICMPV6: 509 case IPPROTO_ICMPV6:
510 port = htons(fl->fl_icmp_type); 510 port = htons(fl->fl_icmp_type);
511 break; 511 break;
512#ifdef CONFIG_IPV6_MIP6
513 case IPPROTO_MH: 512 case IPPROTO_MH:
514 port = htons(fl->fl_mh_type); 513 port = htons(fl->fl_mh_type);
515 break; 514 break;
516#endif
517 default: 515 default:
518 port = 0; /*XXX*/ 516 port = 0; /*XXX*/
519 } 517 }
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c
index 128f94c79c64..01fa302d281e 100644
--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -132,6 +132,8 @@ static void ipv6_rearrange_destopt(struct ipv6hdr *iph, struct ipv6_opt_hdr *des
132bad: 132bad:
133 return; 133 return;
134} 134}
135#else
136static void ipv6_rearrange_destopt(struct ipv6hdr *iph, struct ipv6_opt_hdr *destopt) {}
135#endif 137#endif
136 138
137/** 139/**
@@ -189,10 +191,8 @@ static int ipv6_clear_mutable_options(struct ipv6hdr *iph, int len, int dir)
189 while (exthdr.raw < end) { 191 while (exthdr.raw < end) {
190 switch (nexthdr) { 192 switch (nexthdr) {
191 case NEXTHDR_DEST: 193 case NEXTHDR_DEST:
192#ifdef CONFIG_IPV6_MIP6
193 if (dir == XFRM_POLICY_OUT) 194 if (dir == XFRM_POLICY_OUT)
194 ipv6_rearrange_destopt(iph, exthdr.opth); 195 ipv6_rearrange_destopt(iph, exthdr.opth);
195#endif
196 case NEXTHDR_HOP: 196 case NEXTHDR_HOP:
197 if (!zero_out_mutable_opts(exthdr.opth)) { 197 if (!zero_out_mutable_opts(exthdr.opth)) {
198 LIMIT_NETDEBUG( 198 LIMIT_NETDEBUG(
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index a58459a76684..a22c9c93d931 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -611,9 +611,7 @@ static int rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg)
611 struct iovec *iov; 611 struct iovec *iov;
612 u8 __user *type = NULL; 612 u8 __user *type = NULL;
613 u8 __user *code = NULL; 613 u8 __user *code = NULL;
614#ifdef CONFIG_IPV6_MIP6
615 u8 len = 0; 614 u8 len = 0;
616#endif
617 int probed = 0; 615 int probed = 0;
618 int i; 616 int i;
619 617
@@ -646,7 +644,6 @@ static int rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg)
646 probed = 1; 644 probed = 1;
647 } 645 }
648 break; 646 break;
649#ifdef CONFIG_IPV6_MIP6
650 case IPPROTO_MH: 647 case IPPROTO_MH:
651 if (iov->iov_base && iov->iov_len < 1) 648 if (iov->iov_base && iov->iov_len < 1)
652 break; 649 break;
@@ -660,7 +657,6 @@ static int rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg)
660 len += iov->iov_len; 657 len += iov->iov_len;
661 658
662 break; 659 break;
663#endif
664 default: 660 default:
665 probed = 1; 661 probed = 1;
666 break; 662 break;