diff options
author | Ehsan Mohandesi <emohandesi@linux.microsoft.com> | 2023-04-21 17:08:21 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-05-05 17:58:52 -0400 |
commit | 6de98b60ba89fb96a3adada11a5b5406f3b3786b (patch) | |
tree | 37713f86715e19599874069861547f09037528b0 /include/net.h | |
parent | 09005c2fb288decb4010f062fdc87d0b82e57584 (diff) | |
download | u-boot-6de98b60ba89fb96a3adada11a5b5406f3b3786b.tar.gz u-boot-6de98b60ba89fb96a3adada11a5b5406f3b3786b.tar.bz2 u-boot-6de98b60ba89fb96a3adada11a5b5406f3b3786b.zip |
net: ipv6: Add support for default gateway discovery.
In IPv6, the default gateway and prefix length are determined by receiving
a router advertisement as defined in -
https://www.rfc-editor.org/rfc/rfc4861.
Add support for sending router solicitation (RS) and processing router
advertisements (RA).
If the RA has prefix info option and following conditions are met, then
gatewayip6 and net_prefix_length of ip6addr env variables are initialized.
These are later consumed by IPv6 code for non-local destination IP.
- "Router Lifetime" != 0
- Prefix is NOT link-local prefix (0xfe80::/10)
- L flag is 1
- "Valid Lifetime" != 0
Timing Parameters:
- MAX_RTR_SOLICITATION_DELAY (0-1s)
- RTR_SOLICITATION_INTERVAL (4s) (min retransmit delay)
- MAX_RTR_SOLICITATIONS (3 RS transmissions)
The functionality is enabled by CONFIG_IPV6_ROUTER_DISCOVERY and invoked
automatically from net_init_loop().
Signed-off-by: Ehsan Mohandesi <emohandesi@linux.microsoft.com>
Tested-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com>Reviewed-by:
Tested-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com>
Reviewed-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com>
Tested-by: Sergei Antonov <saproj@gmail.com>
Reviewed-by: Sergei Antonov <saproj@gmail.com>
Diffstat (limited to 'include/net.h')
-rw-r--r-- | include/net.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net.h b/include/net.h index 1b09aa1077..785cb1059e 100644 --- a/include/net.h +++ b/include/net.h @@ -508,7 +508,7 @@ extern int net_restart_wrap; /* Tried all network devices */ enum proto_t { BOOTP, RARP, ARP, TFTPGET, DHCP, DHCP6, PING, PING6, DNS, NFS, CDP, NETCONS, SNTP, TFTPSRV, TFTPPUT, LINKLOCAL, FASTBOOT_UDP, FASTBOOT_TCP, - WOL, UDP, NCSI, WGET + WOL, UDP, NCSI, WGET, RS }; extern char net_boot_file_name[1024];/* Boot File name */ |