* [PATCH] [IPV6] NDISC: ensure responding to NS without link-layer information.
@ 2004-09-16 3:59 YOSHIFUJI Hideaki / 吉藤英明
2004-09-16 20:14 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-09-16 3:59 UTC (permalink / raw)
To: davem; +Cc: netdev, yoshfuji
Hello.
When sending NA in response to NS, we may not know the
link-layer address for the destination of the NA
since unicast NS is not required to include its link-layer information.
In this case, we first need to resolve the link-layer address.
(RFC 2461 7.2.4)
We now create neighbour entry for the destination
and link-layer information will be automatically solved
in the output path.
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Also available at <bk://bk.skbuff.net:20609/linux-2.6-ndp-20040916/>.
Thanks.
diff -Nru a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
--- a/net/ipv6/ndisc.c 2004-09-16 12:54:26 +09:00
+++ b/net/ipv6/ndisc.c 2004-09-16 12:54:26 +09:00
@@ -810,7 +810,8 @@
* update / create cache entry
* for the source address
*/
- neigh = __neigh_lookup(&nd_tbl, saddr, dev, lladdr || !dev->addr_len);
+ neigh = __neigh_lookup(&nd_tbl, saddr, dev,
+ !inc || lladdr || !dev->addr_len);
if (neigh)
neigh_update(neigh, lladdr, NUD_STALE,
NEIGH_UPDATE_F_WEAK_OVERRIDE|
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] [IPV6] NDISC: ensure responding to NS without link-layer information.
2004-09-16 3:59 [PATCH] [IPV6] NDISC: ensure responding to NS without link-layer information YOSHIFUJI Hideaki / 吉藤英明
@ 2004-09-16 20:14 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-09-16 20:14 UTC (permalink / raw)
To: yoshfuji; +Cc: netdev
On Thu, 16 Sep 2004 12:59:21 +0900 (JST)
YOSHIFUJI Hideaki / ^[$B5HF#1QL@^[(B <yoshfuji@linux-ipv6.org> wrote:
> When sending NA in response to NS, we may not know the
> link-layer address for the destination of the NA
> since unicast NS is not required to include its link-layer information.
> In this case, we first need to resolve the link-layer address.
> (RFC 2461 7.2.4)
>
> We now create neighbour entry for the destination
> and link-layer information will be automatically solved
> in the output path.
>
> Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Patch applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-09-16 20:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-16 3:59 [PATCH] [IPV6] NDISC: ensure responding to NS without link-layer information YOSHIFUJI Hideaki / 吉藤英明
2004-09-16 20:14 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).