Bugzilla – Bug 1047
Multicast routes on nodes with >16 interfaces
Last modified: 2011-08-15 09:29:53 EDT
Created attachment 1028 [details] Patch to ns-3.10 for IPv4 and IPv6 multicast TTLs for nodes with > 16 interfaces Multicast routing uses a vector of MAX_INTERFACES (defined as 16) Ttl values to determine which interfaces to send a copy of the packet to. If a node has more than 16 interfaces, you're fine until you want to route multicast packets out of an interface index > 16. If you do route out of index > 16, it is common to get a segfault or other memory access failure (or trash the stack). Proposed solution is to replace the fixed-size vector with a std::map of interface indices and TTL values. The map is populated only with interface indices that you want to route out of. If an interface index is in the map, send a copy of the packet out that interface. If the interface index is not in the map, do not send out that interface. Maintain the map with Ipv4MulticastRoute::SetOutputTtl() by removing map entries with Ttl values > MAX_TTL. The actual TTL values were never used other than to signal whether or not to send out the interface if the TTL value < MAX_TTL. Attached at a patch against 3.10.
Created attachment 1029 [details] Demonstrates error with multicast routes on nodes with > 16 interfaces This script creates a simple IPv4 hub-and-spoke network where the router node in the middle has > 16 interfaces and a multicast route that includes an interface > 16.
Created attachment 1030 [details] Demonstrates error with multicast routes on nodes with > 16 interfaces [IPv6] This script creates a simple IPv4 hub-and-spoke network where the router node in the middle has > 16 interfaces and a multicast route that includes an interface > 16.
(In reply to comment #2) > Created attachment 1030 [details] > Demonstrates error with multicast routes on nodes with > 16 interfaces [IPv6] > > This script creates a simple IPv4 hub-and-spoke network where the router node > in the middle has > 16 interfaces and a multicast route that includes an > interface > 16. I pushed this in changeset 7cc4506fb853. Does it work for you now?
(In reply to comment #3) > (In reply to comment #2) > > Created attachment 1030 [details] > > Demonstrates error with multicast routes on nodes with > 16 interfaces [IPv6] > > > > This script creates a simple IPv4 hub-and-spoke network where the router node > > in the middle has > 16 interfaces and a multicast route that includes an > > interface > 16. > > > I pushed this in changeset 7cc4506fb853. Does it work for you now? This works for me in NS-3.11. Thanks!! -Ken