Skip to content

Commit

Permalink
[IPV6] NDISC: Avoid updating neighbor cache for proxied address in re…
Browse files Browse the repository at this point in the history
…ceiving 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>
  • Loading branch information
Ville Nuorvala authored and David S. Miller committed Sep 22, 2006
1 parent 74553b0 commit 5f3e6e9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions net/ipv6/ndisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down

0 comments on commit 5f3e6e9

Please sign in to comment.