Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15296
b: refs/heads/master
c: 8de3351
h: refs/heads/master
v: v3
  • Loading branch information
YOSHIFUJI Hideaki committed Dec 21, 2005
1 parent 62cdc8c commit 35cce84
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 58c4fb86eabcbc385d954843a635b7f4327be6b0
refs/heads/master: 8de3351e6e0a1081fbf6864ae37839e327699a08
16 changes: 14 additions & 2 deletions trunk/net/ipv6/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,10 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
iif = skb->dev->ifindex;

/*
* Must not send if we know that source is Anycast also.
* for now we don't know that.
* Must not send error if the source does not uniquely
* identify a single node (RFC2463 Section 2.4).
* We check unspecified / multicast addresses here,
* and anycast addresses will be checked later.
*/
if ((addr_type == IPV6_ADDR_ANY) || (addr_type & IPV6_ADDR_MULTICAST)) {
LIMIT_NETDEBUG(KERN_DEBUG "icmpv6_send: addr_any/mcast source\n");
Expand Down Expand Up @@ -373,6 +375,16 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
err = ip6_dst_lookup(sk, &dst, &fl);
if (err)
goto out;

/*
* We won't send icmp if the destination is known
* anycast.
*/
if (((struct rt6_info *)dst)->rt6i_flags & RTF_ANYCAST) {
LIMIT_NETDEBUG(KERN_DEBUG "icmpv6_send: acast source\n");
goto out_dst_release;
}

if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0)
goto out;

Expand Down

0 comments on commit 35cce84

Please sign in to comment.