Skip to content

internet: fix wrong if statement in Icmpv6L4Protocol

Zhiheng Dong requested to merge ZhiHengD/ns-3-dev:statePermanent into master

The if statement if (!entry->IsReachable () || !entry->IsPermanent ()) in Icmpv6L4Protocol::ReceiveLLA and Icmpv6L4Protocol::HandleNA is always true.

If an entry has a state PERMANENT, it shouldn't call StopNudTimer and MarkReachable here, so I think there should be an && in the if statement.

Edit: Refactor Icmpv6L4Protocol::ReceiveLLA and Icmpv6L4Protocol::HandleNA, change the nesting of if statement to switch case

Edited by Zhiheng Dong

Merge request reports