8 Commits
Author SHA1 Message Date
Andrei Vagin 5f4abad306 Fix a few typos
It is an idea of running codespell as part of our presubmit checks.
Before enabling it for new changes, let's fix what it has found.

Signed-off-by: Andrei Vagin <avagin@gmail.com>
2023-10-25 12:13:42 -07:00
Ghanan GowripalanandgVisor bot 52985127a0 Don't route packets w/ unspecified source address
PiperOrigin-RevId: 509914627
2023-02-15 13:26:40 -08:00
Ghanan GowripalanandgVisor bot 8ebc4d767a Accept no buffer space errors when forwarding
The outgoing device queue may be full when forwarding packets and those
errors should not result in a panic.

PiperOrigin-RevId: 499946528
2023-01-05 11:16:56 -08:00
Bruno Dal BoandgVisor bot c40f8e3651 Rename ErrNoRoute to ErrHostUnreachable
ErrNoRoute gets translated to EHOSTUNREACH which causes some code paths to
produce different errors unexpectedly. Rename the error so we can clean up some
sites to return ENETUNREACH more clearly where needed.

Updates #8105

PiperOrigin-RevId: 482355099
2022-10-19 18:29:13 -07:00
Nate HurleyandgVisor bot 006bbe78ca Implement IPv4 multicast forwarding.
This change implements AddMulticastRoute and the requisite routing logic.
Subsequent changes will still be needed to:

1. Emit events for missing route or unexpected input interface
2. Implement DelRoute
3. Implement GetRouteStats

Updates #7338.

PiperOrigin-RevId: 451026594
2022-05-25 15:18:13 -07:00
Nick BrownandgVisor bot 29f4b71eb3 Send ICMP errors when unable to forward fragmented packets
Before this change, we would silently drop packets when the packet was too
big to be sent out through the NIC (and, for IPv4 packets, if DF was set).
This change brings us into line with RFC 792 (IPv4) and RFC 4443 (IPv6),
both of which specify that gateways should return an ICMP error to the sender
when the packet can't be fragmented.

PiperOrigin-RevId: 373480078
2021-05-12 16:53:43 -07:00
Nick BrownandgVisor bot 1daabac237 Process Hop-by-Hop header when forwarding IPv6 packets
Currently, we process IPv6 extension headers when receiving packets
but not when forwarding them. This is fine for the most part, with
with one exception: RFC 8200 requires that we process the
Hop-by-Hop headers even while forwarding packets.

This CL adds that support by invoking the Hop-by-hop logic performed
when receiving packets during forwarding as well.

PiperOrigin-RevId: 373145478
2021-05-11 07:25:56 -07:00
Nick BrownandgVisor bot 3258adb9bb Send ICMP errors when the network is unreachable
Before this change, we would silently drop packets when unable to determine a
route to the destination host. This change brings us into line with RFC 792
(IPv4) and RFC 4443 (IPv6), both of which specify that gateways should return
an ICMP error to the sender when unable to reach the destination.

Startblock:
  has LGTM from asfez
  and then
  add reviewer ghanan
PiperOrigin-RevId: 372214051
2021-05-05 14:58:42 -07:00