u-boot/net
Ehsan Mohandesi 6de98b60ba 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>
2023-05-05 17:58:52 -04:00
..
arp.c Convert CONFIG_NET_RETRY_COUNT to Kconfig 2022-03-18 12:48:17 -04:00
arp.h net: Don't overwrite waiting packets with asynchronous replies 2018-10-10 12:29:01 -05:00
bootp.c Correct SPL use of NETDEVICES 2023-02-10 07:41:39 -05:00
bootp.h net: Use packed structures for networking 2017-08-07 15:18:31 -05:00
cdp.c Remove #include <timestamp.h> from files which do not need it 2021-09-17 12:10:44 -04:00
cdp.h SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
dhcpv6.c net: dhcp6: Add DHCPv6 (DHCP for IPv6) 2023-05-05 17:48:44 -04:00
dhcpv6.h net: dhcp6: Add DHCPv6 (DHCP for IPv6) 2023-05-05 17:48:44 -04:00
dns.c net: move random_port() to dns 2020-06-12 13:17:23 -04:00
dns.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
dsa-uclass.c net: dsa: allow rcv() and xmit() to be optional 2023-02-02 14:22:08 -05:00
eth-uclass.c net: Pull board_interface_eth_init() into common code 2023-03-30 13:47:03 +02:00
eth_bootdev.c bootstd: Add a new pre-scan priority for bootdevs 2023-01-23 18:11:41 -05:00
eth_common.c net: phy: Only call phy_init() on systems needing manual relocation 2023-04-07 14:18:51 +02:00
eth_internal.h net: Remove eth_legacy.c 2022-12-07 16:04:17 -05:00
fastboot_tcp.c net: share fastboot boot handle logic between transports 2023-05-05 17:48:44 -04:00
fastboot_udp.c net: share fastboot boot handle logic between transports 2023-05-05 17:48:44 -04:00
Kconfig Convert CONFIG_HOSTNAME et al to Kconfig 2022-12-22 10:31:48 -05:00
link_local.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
link_local.h net: Add link-local addressing support 2012-05-23 17:53:08 -05:00
Makefile net: add fastboot TCP support 2023-05-05 17:48:44 -04:00
mdio-mux-uclass.c treewide: use dm_mdio_read/write/reset() wrappers 2022-04-10 08:44:12 +03:00
mdio-uclass.c Correct SPL uses of PHY_FIXED 2023-03-02 17:45:58 -05:00
ndisc.c net: ipv6: Add support for default gateway discovery. 2023-05-05 17:58:52 -04:00
net.c net: ipv6: Add support for default gateway discovery. 2023-05-05 17:58:52 -04:00
net6.c net: ipv6: Add support for default gateway discovery. 2023-05-05 17:58:52 -04:00
net_rand.h net: Use NDRNG device in srand_mac() 2021-01-19 09:15:02 -05:00
nfs.c net: add NFSv1 support 2023-05-05 17:48:44 -04:00
nfs.h net: nfs: remove superfluous packed attribute 2019-09-04 11:37:19 -05:00
pcap.c net: introduce packet capture support 2019-09-04 11:37:19 -05:00
ping.c net: Do not respond to ICMP_ECHO_REQUEST if we do not have an IP address 2021-01-19 09:15:02 -05:00
ping.h SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
ping6.c net: ping6: Add ping6 command 2022-12-05 12:47:16 -05:00
rarp.c Convert CONFIG_NET_RETRY_COUNT to Kconfig 2022-03-18 12:48:17 -04:00
rarp.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sntp.c net: sntp: remove CONFIG_TIMESTAMP constraint 2020-12-01 14:12:28 -05:00
tcp.c net: support being a TCP server to unblock TCP fastboot 2023-05-05 17:48:44 -04:00
tftp.c net: ipv6: Fixed IPv6 string to address conversion off-by-one error 2023-02-02 14:44:53 -05:00
udp.c net: add a generic udp protocol 2020-09-30 16:55:03 -04:00
wget.c net: support being a TCP server to unblock TCP fastboot 2023-05-05 17:48:44 -04:00
wol.c env: Drop environment.h header file where not needed 2019-08-11 16:43:41 -04:00
wol.h net: Add new wol command - Wake on LAN 2018-07-02 14:14:20 -05:00