From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [RFC] IPv6: don't forward unspecified frames
Date: Mon, 22 Feb 2010 17:31:53 -0800 [thread overview]
Message-ID: <20100222173153.79190176@nehalam> (raw)
This showed up during UNH IPv6 conformance tests. It appears kernel
incorrectly forwards packets with unspecified source address.
This looks like the place to fix this, but still not sure and have
no easy way to test it since ping6 won't send packet with unspecified
source address.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/net/ipv6/ip6_output.c 2010-02-19 15:05:51.332330381 -0800
+++ b/net/ipv6/ip6_output.c 2010-02-19 15:10:28.400092910 -0800
@@ -436,6 +436,17 @@ int ip6_forward(struct sk_buff *skb)
}
/*
+ * RFC4291 2.5.2
+ *
+ * An IPv6 packet with a source address of unspecified
+ * must never be forwarded by an IPv6 router.
+ */
+ if (ipv6_addr_any(&hdr->saddr)) {
+ IP6_INC_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTDISCARDS);
+ goto drop;
+ }
+
+ /*
* check and decrement ttl
*/
if (hdr->hop_limit <= 1) {
next reply other threads:[~2010-02-23 1:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-23 1:31 Stephen Hemminger [this message]
2010-02-23 5:11 ` [RFC] IPv6: don't forward unspecified frames Shan Wei
2010-02-23 16:46 ` Stephen Hemminger
2010-02-23 18:50 ` Stephen Hemminger
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=20100222173153.79190176@nehalam \
--to=shemminger@vyatta.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).