Commit 136ebf08 authored by Masahide NAKAMURA's avatar Masahide NAKAMURA Committed by David S. Miller

[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: default avatarMasahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2371baa4
...@@ -67,20 +67,16 @@ struct flowi { ...@@ -67,20 +67,16 @@ struct flowi {
__be32 spi; __be32 spi;
#ifdef CONFIG_IPV6_MIP6
struct { struct {
__u8 type; __u8 type;
} mht; } mht;
#endif
} uli_u; } uli_u;
#define fl_ip_sport uli_u.ports.sport #define fl_ip_sport uli_u.ports.sport
#define fl_ip_dport uli_u.ports.dport #define fl_ip_dport uli_u.ports.dport
#define fl_icmp_type uli_u.icmpt.type #define fl_icmp_type uli_u.icmpt.type
#define fl_icmp_code uli_u.icmpt.code #define fl_icmp_code uli_u.icmpt.code
#define fl_ipsec_spi uli_u.spi #define fl_ipsec_spi uli_u.spi
#ifdef CONFIG_IPV6_MIP6
#define fl_mh_type uli_u.mht.type #define fl_mh_type uli_u.mht.type
#endif
__u32 secid; /* used by xfrm; see secid.txt */ __u32 secid; /* used by xfrm; see secid.txt */
} __attribute__((__aligned__(BITS_PER_LONG/8))); } __attribute__((__aligned__(BITS_PER_LONG/8)));
......
...@@ -509,11 +509,9 @@ __be16 xfrm_flowi_sport(struct flowi *fl) ...@@ -509,11 +509,9 @@ __be16 xfrm_flowi_sport(struct flowi *fl)
case IPPROTO_ICMPV6: case IPPROTO_ICMPV6:
port = htons(fl->fl_icmp_type); port = htons(fl->fl_icmp_type);
break; break;
#ifdef CONFIG_IPV6_MIP6
case IPPROTO_MH: case IPPROTO_MH:
port = htons(fl->fl_mh_type); port = htons(fl->fl_mh_type);
break; break;
#endif
default: default:
port = 0; /*XXX*/ port = 0; /*XXX*/
} }
......
...@@ -132,6 +132,8 @@ static void ipv6_rearrange_destopt(struct ipv6hdr *iph, struct ipv6_opt_hdr *des ...@@ -132,6 +132,8 @@ static void ipv6_rearrange_destopt(struct ipv6hdr *iph, struct ipv6_opt_hdr *des
bad: bad:
return; return;
} }
#else
static void ipv6_rearrange_destopt(struct ipv6hdr *iph, struct ipv6_opt_hdr *destopt) {}
#endif #endif
/** /**
...@@ -189,10 +191,8 @@ static int ipv6_clear_mutable_options(struct ipv6hdr *iph, int len, int dir) ...@@ -189,10 +191,8 @@ static int ipv6_clear_mutable_options(struct ipv6hdr *iph, int len, int dir)
while (exthdr.raw < end) { while (exthdr.raw < end) {
switch (nexthdr) { switch (nexthdr) {
case NEXTHDR_DEST: case NEXTHDR_DEST:
#ifdef CONFIG_IPV6_MIP6
if (dir == XFRM_POLICY_OUT) if (dir == XFRM_POLICY_OUT)
ipv6_rearrange_destopt(iph, exthdr.opth); ipv6_rearrange_destopt(iph, exthdr.opth);
#endif
case NEXTHDR_HOP: case NEXTHDR_HOP:
if (!zero_out_mutable_opts(exthdr.opth)) { if (!zero_out_mutable_opts(exthdr.opth)) {
LIMIT_NETDEBUG( LIMIT_NETDEBUG(
......
...@@ -611,9 +611,7 @@ static int rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg) ...@@ -611,9 +611,7 @@ static int rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg)
struct iovec *iov; struct iovec *iov;
u8 __user *type = NULL; u8 __user *type = NULL;
u8 __user *code = NULL; u8 __user *code = NULL;
#ifdef CONFIG_IPV6_MIP6
u8 len = 0; u8 len = 0;
#endif
int probed = 0; int probed = 0;
int i; int i;
...@@ -646,7 +644,6 @@ static int rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg) ...@@ -646,7 +644,6 @@ static int rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg)
probed = 1; probed = 1;
} }
break; break;
#ifdef CONFIG_IPV6_MIP6
case IPPROTO_MH: case IPPROTO_MH:
if (iov->iov_base && iov->iov_len < 1) if (iov->iov_base && iov->iov_len < 1)
break; break;
...@@ -660,7 +657,6 @@ static int rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg) ...@@ -660,7 +657,6 @@ static int rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg)
len += iov->iov_len; len += iov->iov_len;
break; break;
#endif
default: default:
probed = 1; probed = 1;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment