Bug 1047 - Multicast routes on nodes with >16 interfaces
Multicast routes on nodes with >16 interfaces
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: routing
ns-3.9
All All
: P5 enhancement
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-26 11:23 EST by Ken Renard
Modified: 2011-08-15 09:29 EDT (History)
1 user (show)

See Also:


Attachments
Patch to ns-3.10 for IPv4 and IPv6 multicast TTLs for nodes with > 16 interfaces (9.79 KB, patch)
2011-01-26 11:23 EST, Ken Renard
Details | Diff
Demonstrates error with multicast routes on nodes with > 16 interfaces (2.18 KB, text/plain)
2011-01-26 11:26 EST, Ken Renard
Details
Demonstrates error with multicast routes on nodes with > 16 interfaces [IPv6] (2.32 KB, text/plain)
2011-01-26 11:27 EST, Ken Renard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Renard 2011-01-26 11:23:57 EST
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.
Comment 1 Ken Renard 2011-01-26 11:26:46 EST
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.
Comment 2 Ken Renard 2011-01-26 11:27:18 EST
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.
Comment 3 Tom Henderson 2011-05-13 03:29:49 EDT
(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?
Comment 4 Ken Renard 2011-08-15 08:20:34 EDT
(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