internet: fix wrong if statement in Icmpv6L4Protocol
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