diff options
author | Ville Nuorvala <vnuorval@tcs.hut.fi> | 2006-09-22 17:42:46 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 18:20:23 -0400 |
commit | 5f3e6e9e19f50a6910aec2dbd479187aabba04b7 (patch) | |
tree | 872c70c3012701ebae6d7f1861894f9d0e634817 /net | |
parent | 74553b09dcd9194cbda737016f0b89f245145670 (diff) |
[IPV6] NDISC: Avoid updating neighbor cache for proxied address in receiving NA.
This aims at proxying router not updating neighbor cache entry for proxied
address when it receives NA because either the proxied node is off link or
it has already sent a NA to the proxied router.
Based on MIPL2 kernel patch.
Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi>
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/ndisc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index ed01f9a330d6..0e0d6ce69021 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -952,6 +952,15 @@ static void ndisc_recv_na(struct sk_buff *skb) | |||
952 | if (neigh->nud_state & NUD_FAILED) | 952 | if (neigh->nud_state & NUD_FAILED) |
953 | goto out; | 953 | goto out; |
954 | 954 | ||
955 | /* | ||
956 | * Don't update the neighbor cache entry on a proxy NA from | ||
957 | * ourselves because either the proxied node is off link or it | ||
958 | * has already sent a NA to us. | ||
959 | */ | ||
960 | if (lladdr && !memcmp(lladdr, dev->dev_addr, dev->addr_len) && | ||
961 | pneigh_lookup(&nd_tbl, &msg->target, dev, 0)) | ||
962 | goto out; | ||
963 | |||
955 | neigh_update(neigh, lladdr, | 964 | neigh_update(neigh, lladdr, |
956 | msg->icmph.icmp6_solicited ? NUD_REACHABLE : NUD_STALE, | 965 | msg->icmph.icmp6_solicited ? NUD_REACHABLE : NUD_STALE, |
957 | NEIGH_UPDATE_F_WEAK_OVERRIDE| | 966 | NEIGH_UPDATE_F_WEAK_OVERRIDE| |