Skip to content

Commit 136ebf0

Browse files
Masahide NAKAMURADavid S. Miller
authored andcommitted
[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>
1 parent 2371baa commit 136ebf0

4 files changed

Lines changed: 2 additions & 12 deletions

File tree

‎include/net/flow.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,16 @@ struct flowi {
6767

6868
__be32 spi;
6969

70-
#ifdef CONFIG_IPV6_MIP6
7170
struct {
7271
__u8 type;
7372
} mht;
74-
#endif
7573
} uli_u;
7674
#define fl_ip_sport uli_u.ports.sport
7775
#define fl_ip_dport uli_u.ports.dport
7876
#define fl_icmp_type uli_u.icmpt.type
7977
#define fl_icmp_code uli_u.icmpt.code
8078
#define fl_ipsec_spi uli_u.spi
81-
#ifdef CONFIG_IPV6_MIP6
8279
#define fl_mh_type uli_u.mht.type
83-
#endif
8480
__u32 secid; /* used by xfrm; see secid.txt */
8581
} __attribute__((__aligned__(BITS_PER_LONG/8)));
8682

‎include/net/xfrm.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,11 +509,9 @@ __be16 xfrm_flowi_sport(struct flowi *fl)
509509
case IPPROTO_ICMPV6:
510510
port = htons(fl->fl_icmp_type);
511511
break;
512-
#ifdef CONFIG_IPV6_MIP6
513512
case IPPROTO_MH:
514513
port = htons(fl->fl_mh_type);
515514
break;
516-
#endif
517515
default:
518516
port = 0; /*XXX*/
519517
}

‎net/ipv6/ah6.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ static void ipv6_rearrange_destopt(struct ipv6hdr *iph, struct ipv6_opt_hdr *des
132132
bad:
133133
return;
134134
}
135+
#else
136+
static void ipv6_rearrange_destopt(struct ipv6hdr *iph, struct ipv6_opt_hdr *destopt) {}
135137
#endif
136138

137139
/**
@@ -189,10 +191,8 @@ static int ipv6_clear_mutable_options(struct ipv6hdr *iph, int len, int dir)
189191
while (exthdr.raw < end) {
190192
switch (nexthdr) {
191193
case NEXTHDR_DEST:
192-
#ifdef CONFIG_IPV6_MIP6
193194
if (dir == XFRM_POLICY_OUT)
194195
ipv6_rearrange_destopt(iph, exthdr.opth);
195-
#endif
196196
case NEXTHDR_HOP:
197197
if (!zero_out_mutable_opts(exthdr.opth)) {
198198
LIMIT_NETDEBUG(

‎net/ipv6/raw.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -611,9 +611,7 @@ static int rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg)
611611
struct iovec *iov;
612612
u8 __user *type = NULL;
613613
u8 __user *code = NULL;
614-
#ifdef CONFIG_IPV6_MIP6
615614
u8 len = 0;
616-
#endif
617615
int probed = 0;
618616
int i;
619617

@@ -646,7 +644,6 @@ static int rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg)
646644
probed = 1;
647645
}
648646
break;
649-
#ifdef CONFIG_IPV6_MIP6
650647
case IPPROTO_MH:
651648
if (iov->iov_base && iov->iov_len < 1)
652649
break;
@@ -660,7 +657,6 @@ static int rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg)
660657
len += iov->iov_len;
661658

662659
break;
663-
#endif
664660
default:
665661
probed = 1;
666662
break;

0 commit comments

Comments
 (0)