diff options
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r-- | net/ipv6/ip6_output.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 0f56e9e69a8f..b2be749d2217 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -345,6 +345,16 @@ static int ip6_forward_proxy_check(struct sk_buff *skb) | |||
345 | } | 345 | } |
346 | } | 346 | } |
347 | 347 | ||
348 | /* | ||
349 | * The proxying router can't forward traffic sent to a link-local | ||
350 | * address, so signal the sender and discard the packet. This | ||
351 | * behavior is clarified by the MIPv6 specification. | ||
352 | */ | ||
353 | if (ipv6_addr_type(&hdr->daddr) & IPV6_ADDR_LINKLOCAL) { | ||
354 | dst_link_failure(skb); | ||
355 | return -1; | ||
356 | } | ||
357 | |||
348 | return 0; | 358 | return 0; |
349 | } | 359 | } |
350 | 360 | ||
@@ -403,8 +413,13 @@ int ip6_forward(struct sk_buff *skb) | |||
403 | } | 413 | } |
404 | 414 | ||
405 | if (pneigh_lookup(&nd_tbl, &hdr->daddr, skb->dev, 0)) { | 415 | if (pneigh_lookup(&nd_tbl, &hdr->daddr, skb->dev, 0)) { |
406 | if (ip6_forward_proxy_check(skb)) | 416 | int proxied = ip6_forward_proxy_check(skb); |
417 | if (proxied > 0) | ||
407 | return ip6_input(skb); | 418 | return ip6_input(skb); |
419 | else if (proxied < 0) { | ||
420 | IP6_INC_STATS(IPSTATS_MIB_INDISCARDS); | ||
421 | goto drop; | ||
422 | } | ||
408 | } | 423 | } |
409 | 424 | ||
410 | if (!xfrm6_route_forward(skb)) { | 425 | if (!xfrm6_route_forward(skb)) { |