internet: Suppress ICMP no-route errors in response to ICMP errors (fixes #1408)
Summary
Fixes #1408.
Ipv4L3Protocol::SendIcmpNoRoute() could generate a Destination Unreachable when an AODV deferred-route queue dropped an ICMP error about an unreachable packet. Under a partitioned AODV topology, this can form a zero-simulation-time ICMP error loop.
The no-route path now applies the suppression rules in RFC 1122 §3.2.2 and RFC 1812 §4.3.2.7:
- Do not generate ICMP errors in response to ICMP error types (3, 4, 5, 11, 12).
- Do not generate errors for non-initial IPv4 fragments.
- Suppress broadcast/multicast destinations, including subnet-directed broadcast.
- Suppress non-unicast/invalid IPv4 sources.
- Do not synthesize a no-route ICMP error to an address owned by the local router. This prevents the loop on AODV's deferred locally generated packets.
The existing required behavior for forwarded unicast packets (#825 (closed)) is retained.
Regression tests
Extended the existing ipv4-icmp-no-route suite to cover:
- ICMP Echo Request (type 8): exactly one net-unreachable error from the router;
- ICMP error types 3, 4, 5, 11, 12: no net-unreachable error from the router.
The topology retains an IPv4 forwarder with a deliberately unroutable destination. The test covers the loop-preventing ICMP condition without needing to hang a simulator with millions of packets.
Validation
Implementation and regression tests are in commits c93743a7 and 6d107258. The branch is based on upstream master a150de8f.
CI infrastructure issue, not yet a code/test verdict: the initial push and merge-request pipelines (3091488588, 3091490520, 3091493720) and latest head pipeline (3091498195) were marked failed immediately without starting and report zero CI jobs. GitLab reported yaml_errors: null; there are no job traces to diagnose compilation or runtime. The new suite, Doxygen, and the external AODV full-topology reproducer have not yet been executed in a runner. This MR must not be treated as passing CI until a real pipeline runs.
Scope
Small IPv4 no-route-only change. No changes to AODV's routing algorithm or to unrelated ICMP generation paths.
Please review the local-origin suppression policy if it should be handled differently from the RFC-required ICMP-error suppression.
Assisted by AI tooling.