From: lyw <lyw@nanjing-fnst.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: Re:[patch]IPv6:fix BUG of ndisc_send_redirect()
Date: Mon, 29 Jan 2007 18:16:36 +0800 [thread overview]
Message-ID: <1170065796.3162.22.camel@localhost.localdomain> (raw)
Mr David:
I have submitted a patch to fix the ndisc_send_resirect(), and this
patch has been agreed by Mr yoshifuji. But you have not applied yet.
The following is Mr yoshifuji's reply, and I submitted the patch again.
In article <1168679560.3639.11.camel@localhost.localdomain> (at Sat, 13
Jan 2007 17:12:40 +0800), Li Yewang <lyw@nanjing-fnst.com> says:
> > When I tested IPv6 redirect function about kernel 2.6.19.1, and
found
> > that the kernel can send redirect packets whose target address is
global
> > address, and the target is not the actual endpoint of communication.
:
> > So, I think the send redirect function must check the target address
> > also.
It is not mandatory, however, it is better to do this. I agree.
(Note: In usual, we do not install gateway'ed route with global
next-hop.)
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
--yoshfuji
Following is my patch:
signed-off-by: Li Yewang <lyw@nanjing-fnst.com>
--- a/net/ipv6/ndisc.c 2007-01-29 18:12:35.036415512 +0800
+++ b/net/ipv6/ndisc.c 2007-01-13 17:02:02.000000000 +0800
@@ -1412,6 +1412,13 @@ void ndisc_send_redirect(struct sk_buff
return;
}
+ if (!ipv6_addr_equal(&skb->nh.ipv6h->daddr, target) &&
+ !(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) {
+ ND_PRINTK2(KERN_WARNING
+ "ICMPv6 Redirect: target address is not link-
local.\n");
+ return;
+ }
+
ndisc_flow_init(&fl, NDISC_REDIRECT, &saddr_buf, &skb->nh.ipv6h-
>saddr,
dev->ifindex);
next reply other threads:[~2007-01-29 10:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-29 10:16 lyw [this message]
2007-01-30 22:33 ` [patch]IPv6:fix BUG of ndisc_send_redirect() David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1170065796.3162.22.camel@localhost.localdomain \
--to=lyw@nanjing-fnst.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).