Skip to content

Commit 5f3e6e9

Browse files
Ville NuorvalaDavid S. Miller
authored andcommitted
[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 <[email protected]> Signed-off-by: Masahide NAKAMURA <[email protected]> Signed-off-by: YOSHIFUJI Hideaki <[email protected]>
1 parent 74553b0 commit 5f3e6e9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

net/ipv6/ndisc.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,15 @@ static void ndisc_recv_na(struct sk_buff *skb)
952952
if (neigh->nud_state & NUD_FAILED)
953953
goto out;
954954

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+
955964
neigh_update(neigh, lladdr,
956965
msg->icmph.icmp6_solicited ? NUD_REACHABLE : NUD_STALE,
957966
NEIGH_UPDATE_F_WEAK_OVERRIDE|

0 commit comments

Comments
 (0)