Commit Graph

6 Commits

Author SHA1 Message Date
Christian Helmuth
3bd04d1253 Check nping permissions in nic_router_ipv4_fragm.run 2024-06-20 12:54:30 +02:00
Norman Feske
db72301eb0 nic_router.run: use [build_artifacts]
Issue #4860
2023-11-28 14:44:28 +01:00
Norman Feske
d9f5dda322 lwip: increase TCP send buffer 32->80 packets
Issue #4697
2023-01-24 12:07:28 +01:00
Martin Stein
e648e7255a nic_router: optional icmp type 3 on fragm. ipv4
Via a new configuration attribute, the user can decide whether the router
should answer dropped fragmented IPv4 with an ICMP "destination unreachable"
packet and, if so, which value the ICMP code field of this packet should have.
The default is that the router doesn't send such responses (silently dropping
fragmented IPv4). The behavior is tested by the 'nic_router_ipv4_fragm' test.

Fixes #4236
2021-08-18 15:06:12 +02:00
Martin Stein
06a4608f4a nic_router: report dropped fragmented IPv4
If the new attribute 'dropped_fragm_ipv4' of the <report> tag in the NIC router
config is set "yes", the router will report the number of packets that were
dropped per interface respectively domain because fragmented IPv4 is not
supported. The default is not to report the counter. The behavior is tested by
the 'nic_router_ipv4_fragm' test.

Ref #4236
2021-08-18 15:06:12 +02:00
Martin Stein
619474bc90 nic_router: drop fragmented IPv4
The NIC router used to ignore the IPv4 header fields "More fragments" and
"Fragment offset" completely. Therefore higher-level protocols of fragmented
IPv4 were interpreted wrong because each fragment was considered a self-
standing packet, expecting, for instance UDP/TCP headers somewhere inside of
the UDP/TCP data field. Normally, such packets were dropped as soon as the
UDP/TCP checksum check failed because of the misinterpretation. However,
it was also possible for fragmented IPv4 to pass the router although normally
only partially.

IPv4 fragmentation support in the router would introduce some potential
security risks and is presumably not an easy endeavor. So, for now, we settled
on not supporting IPv4 fragmentation. With this commit, the router simply drops
all fragmented IPv4. This is reflected to the log for each fragment as "drop
packet (fragmented IPv4 not supported)" when 'verbose_packet_drop="yes"' is
configured.

The new test 'run/nic_router_ipv4_fragm' is an automated test for this
behavior. The test is added to the autopilot list.

Ref #4236
2021-08-18 15:06:12 +02:00