[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130206121248.GC10290@order.stressinduktion.org>
Date: Wed, 6 Feb 2013 13:12:48 +0100
From: Hannes Frederic Sowa <hannes@...essinduktion.org>
To: Erik Hugne <erik.hugne@...csson.com>
Cc: netdev@...r.kernel.org, yoshfuji@...ux-ipv6.org
Subject: Re: [IPv6] interface-local multicast escapes the local node
On Wed, Feb 06, 2013 at 09:49:49AM +0100, Erik Hugne wrote:
> It seems that packets sent to interface-local scoped multicast
> addresses (ff01::/16) escape out on the network.
> According to RFC4291 (section 2.7):
> Interface-Local scope spans only a single interface on a node
> and is useful only for loopback transmission of multicast.
>
> Example program here:
> https://gist.github.com/Hugne/4721151
Fixing the output path should be relatively straightforward, please test
the following patch.
Looking at the input path, I think there is also no input protection
for ff01::/16 addresses from the wire if you bind such an address.
[PATCH net-next] ipv6: don't let node/interface scoped multicast traffic escape on the wire
Reported-by: Erik Hugne <erik.hugne@...csson.com>
Cc: Erik Hugne <erik.hugne@...csson.com>
Cc: YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>
Signed-off-by: Hannes Frederic Sowa <hannes@...essinduktion.org>
---
net/ipv6/ip6_output.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 906b7e6..b21ff3d 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -118,6 +118,12 @@ static int ip6_finish_output2(struct sk_buff *skb)
}
}
+ if (IPV6_ADDR_MC_SCOPE(&ipv6_hdr(skb)->daddr) <=
+ IPV6_ADDR_SCOPE_NODELOCAL) {
+ kfree_skb(skb);
+ return 0;
+ }
+
IP6_UPD_PO_STATS(dev_net(dev), idev, IPSTATS_MIB_OUTMCAST,
skb->len);
}
--
1.8.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists