src/internet-stack/ipv6-l3-protocol.cc
changeset 5863 a4b21e0ee84c
parent 5856 7fd20c798a7d
child 5891 09a575cdf8db
--- a/src/internet-stack/ipv6-l3-protocol.cc	Fri Dec 18 18:05:19 2009 +0100
+++ b/src/internet-stack/ipv6-l3-protocol.cc	Fri Dec 18 18:17:32 2009 +0100
@@ -635,7 +635,13 @@
 
   hdr = BuildHeader (source, destination, protocol, packet->GetSize (), ttl);
 
-  if (!source.IsAny ())
+  //for link-local traffic, we need to determine the interface
+  if (source.IsLinkLocal() ||
+      destination.IsLinkLocal() ||
+      destination.IsAllNodesMulticast() ||
+      destination.IsAllRoutersMulticast() ||
+      destination.IsAllHostsMulticast() ||
+      destination.IsSolicitedMulticast())
   {
     int32_t index = GetInterfaceForAddress (source);
     NS_ASSERT (index >= 0);