Skip to content

Refactor Ipv4L3Protocol::Send to fragment broadcast packets

JaredD requested to merge jaredd/ns-3-dev:patch/fragment-broadcast into master

In dense mesh networks using OLSR for routing, routing message updates can become large due to long lists of neighbor nodes being passed around. These update packets are sent out of interfaces as subnet-directed broadcast packets. Prior to this commit, Ipv4L3Protocol did not check to fragment subnet-directed broadcast packets and OLSR would fail to converge to a routing solution (in large-scale dense scenarios).

This commit mainly adds the ability to fragment and reassemble broadcast packets using the same mechanism as Ipv4L3Protocol had been using for unicast packets. A new test has been added in src/internet/test/ipv4-fragmentation-test.cc. It has been confirmed that without the changes from this commit, the added broadcast fragmentation and reassembly test fails. There has not been any observed regressions with an incomplete sampling of other tests.

This commit also includes a few additional changes making notation more consistent among callback handlers in Ipv4L3Protocol. Specifically IpMulticastForward has a few local variable names changed to agree with those in IpForward (unicast) and there is a new multicast forward tracepoint. The SendRealOut method was also refactored to remove a lot of redundant or nearly redundant code, hopefully heading off any future update errors where only one branch of the redundant code would be updated.

Additionally, a new test method was added to Ipv4Address, IsEmpty. This method checks the address against the default "invalid" or "unassigned" address that is set in the default constructor. This makes the test method set more complete.

Merge request reports