gvisor/pkg/tcpip/header
Ghanan Gowripalan e63db5e7bb Discover default routers from Router Advertisements
This change allows the netstack to do NDP's Router Discovery as outlined by
RFC 4861 section 6.3.4.

Note, this change will not break existing uses of netstack as the default
configuration for the stack options is set in such a way that Router Discovery
will not be performed. See `stack.Options` and `stack.NDPConfigurations` for
more details.

This change introduces 2 options required to take advantage of Router Discovery,
all available under NDPConfigurations:
- HandleRAs: Whether or not NDP RAs are processes
- DiscoverDefaultRouters: Whether or not Router Discovery is performed

Another note: for a NIC to process Router Advertisements, it must not be a
router itself. Currently the netstack does not have per-interface routing
configuration; the routing/forwarding configuration is controlled stack-wide.
Therefore, if the stack is configured to enable forwarding/routing, no Router
Advertisements will be processed.

Tests: Unittest to make sure that Router Discovery and updates to the routing
table only occur if explicitly configured to do so. Unittest to make sure at
max stack.MaxDiscoveredDefaultRouters discovered default routers are remembered.
PiperOrigin-RevId: 278965143
2019-11-06 16:29:58 -08:00
..
BUILD
arp.go
checksum.go netstack/tcp: software segmentation offload 2019-10-22 11:55:56 -07:00
checksum_test.go netstack/tcp: software segmentation offload 2019-10-22 11:55:56 -07:00
eth.go
eth_test.go Auto-generate an IPv6 link-local address based on the NIC's MAC Address. 2019-10-22 07:26:54 -07:00
gue.go
icmpv4.go
icmpv6.go
interfaces.go
ipv4.go
ipv6.go
ipv6_fragment.go
ipversion_test.go
ndp_neighbor_advert.go
ndp_neighbor_solicit.go Add a type to represent the NDP Router Advertisement message. 2019-10-22 14:41:51 -07:00
ndp_options.go
ndp_router_advert.go
ndp_test.go
tcp.go Stub out support for TCP_MAXSEG. 2019-07-12 13:35:17 -07:00
tcp_test.go Update canonical repository. 2019-06-13 16:50:15 -07:00
udp.go