aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorVille Nuorvala <vnuorval@tcs.hut.fi>2006-09-22 14:42:46 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 15:20:23 -0700
commit5f3e6e9e19f50a6910aec2dbd479187aabba04b7 (patch)
tree872c70c3012701ebae6d7f1861894f9d0e634817 /net
parent[IPV6]: Don't forward packets to proxied link-local address. (diff)
downloadlinux-dev-5f3e6e9e19f50a6910aec2dbd479187aabba04b7.tar.xz
linux-dev-5f3e6e9e19f50a6910aec2dbd479187aabba04b7.zip
[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.c9
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)
if (neigh->nud_state & NUD_FAILED)
goto out;
+ /*
+ * Don't update the neighbor cache entry on a proxy NA from
+ * ourselves because either the proxied node is off link or it
+ * has already sent a NA to us.
+ */
+ if (lladdr && !memcmp(lladdr, dev->dev_addr, dev->addr_len) &&
+ pneigh_lookup(&nd_tbl, &msg->target, dev, 0))
+ goto out;
+
neigh_update(neigh, lladdr,
msg->icmph.icmp6_solicited ? NUD_REACHABLE : NUD_STALE,
NEIGH_UPDATE_F_WEAK_OVERRIDE|