Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Masahide NAKAMURA and committed by
David S. Miller
136ebf08 2371baa4

+2 -12
-4
include/net/flow.h
··· 67 67 68 68 __be32 spi; 69 69 70 - #ifdef CONFIG_IPV6_MIP6 71 70 struct { 72 71 __u8 type; 73 72 } mht; 74 - #endif 75 73 } uli_u; 76 74 #define fl_ip_sport uli_u.ports.sport 77 75 #define fl_ip_dport uli_u.ports.dport 78 76 #define fl_icmp_type uli_u.icmpt.type 79 77 #define fl_icmp_code uli_u.icmpt.code 80 78 #define fl_ipsec_spi uli_u.spi 81 - #ifdef CONFIG_IPV6_MIP6 82 79 #define fl_mh_type uli_u.mht.type 83 - #endif 84 80 __u32 secid; /* used by xfrm; see secid.txt */ 85 81 } __attribute__((__aligned__(BITS_PER_LONG/8))); 86 82
-2
include/net/xfrm.h
··· 509 509 case IPPROTO_ICMPV6: 510 510 port = htons(fl->fl_icmp_type); 511 511 break; 512 - #ifdef CONFIG_IPV6_MIP6 513 512 case IPPROTO_MH: 514 513 port = htons(fl->fl_mh_type); 515 514 break; 516 - #endif 517 515 default: 518 516 port = 0; /*XXX*/ 519 517 }
+2 -2
net/ipv6/ah6.c
··· 132 132 bad: 133 133 return; 134 134 } 135 + #else 136 + static void ipv6_rearrange_destopt(struct ipv6hdr *iph, struct ipv6_opt_hdr *destopt) {} 135 137 #endif 136 138 137 139 /** ··· 191 189 while (exthdr.raw < end) { 192 190 switch (nexthdr) { 193 191 case NEXTHDR_DEST: 194 - #ifdef CONFIG_IPV6_MIP6 195 192 if (dir == XFRM_POLICY_OUT) 196 193 ipv6_rearrange_destopt(iph, exthdr.opth); 197 - #endif 198 194 case NEXTHDR_HOP: 199 195 if (!zero_out_mutable_opts(exthdr.opth)) { 200 196 LIMIT_NETDEBUG(
-4
net/ipv6/raw.c
··· 611 611 struct iovec *iov; 612 612 u8 __user *type = NULL; 613 613 u8 __user *code = NULL; 614 - #ifdef CONFIG_IPV6_MIP6 615 614 u8 len = 0; 616 - #endif 617 615 int probed = 0; 618 616 int i; 619 617 ··· 644 646 probed = 1; 645 647 } 646 648 break; 647 - #ifdef CONFIG_IPV6_MIP6 648 649 case IPPROTO_MH: 649 650 if (iov->iov_base && iov->iov_len < 1) 650 651 break; ··· 657 660 len += iov->iov_len; 658 661 659 662 break; 660 - #endif 661 663 default: 662 664 probed = 1; 663 665 break;