diff options
Diffstat (limited to 'net/ipv6/ah6.c')
-rw-r--r-- | net/ipv6/ah6.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index 128f94c79c64..53f46ab6af70 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c | |||
@@ -74,7 +74,7 @@ bad: | |||
74 | return 0; | 74 | return 0; |
75 | } | 75 | } |
76 | 76 | ||
77 | #ifdef CONFIG_IPV6_MIP6 | 77 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) |
78 | /** | 78 | /** |
79 | * ipv6_rearrange_destopt - rearrange IPv6 destination options header | 79 | * ipv6_rearrange_destopt - rearrange IPv6 destination options header |
80 | * @iph: IPv6 header | 80 | * @iph: IPv6 header |
@@ -132,6 +132,8 @@ static void ipv6_rearrange_destopt(struct ipv6hdr *iph, struct ipv6_opt_hdr *des | |||
132 | bad: | 132 | bad: |
133 | return; | 133 | return; |
134 | } | 134 | } |
135 | #else | ||
136 | static 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( |
@@ -228,7 +228,7 @@ static int ah6_output(struct xfrm_state *x, struct sk_buff *skb) | |||
228 | u8 nexthdr; | 228 | u8 nexthdr; |
229 | char tmp_base[8]; | 229 | char tmp_base[8]; |
230 | struct { | 230 | struct { |
231 | #ifdef CONFIG_IPV6_MIP6 | 231 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) |
232 | struct in6_addr saddr; | 232 | struct in6_addr saddr; |
233 | #endif | 233 | #endif |
234 | struct in6_addr daddr; | 234 | struct in6_addr daddr; |
@@ -255,7 +255,7 @@ static int ah6_output(struct xfrm_state *x, struct sk_buff *skb) | |||
255 | err = -ENOMEM; | 255 | err = -ENOMEM; |
256 | goto error; | 256 | goto error; |
257 | } | 257 | } |
258 | #ifdef CONFIG_IPV6_MIP6 | 258 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) |
259 | memcpy(tmp_ext, &top_iph->saddr, extlen); | 259 | memcpy(tmp_ext, &top_iph->saddr, extlen); |
260 | #else | 260 | #else |
261 | memcpy(tmp_ext, &top_iph->daddr, extlen); | 261 | memcpy(tmp_ext, &top_iph->daddr, extlen); |
@@ -294,7 +294,7 @@ static int ah6_output(struct xfrm_state *x, struct sk_buff *skb) | |||
294 | 294 | ||
295 | memcpy(top_iph, tmp_base, sizeof(tmp_base)); | 295 | memcpy(top_iph, tmp_base, sizeof(tmp_base)); |
296 | if (tmp_ext) { | 296 | if (tmp_ext) { |
297 | #ifdef CONFIG_IPV6_MIP6 | 297 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) |
298 | memcpy(&top_iph->saddr, tmp_ext, extlen); | 298 | memcpy(&top_iph->saddr, tmp_ext, extlen); |
299 | #else | 299 | #else |
300 | memcpy(&top_iph->daddr, tmp_ext, extlen); | 300 | memcpy(&top_iph->daddr, tmp_ext, extlen); |
@@ -554,3 +554,4 @@ module_init(ah6_init); | |||
554 | module_exit(ah6_fini); | 554 | module_exit(ah6_fini); |
555 | 555 | ||
556 | MODULE_LICENSE("GPL"); | 556 | MODULE_LICENSE("GPL"); |
557 | MODULE_ALIAS_XFRM_TYPE(AF_INET6, XFRM_PROTO_AH); | ||