Skip to content

Commit f88784a

Browse files
spe-cielltcarlescufi
authored andcommitted
net: ipv6: Setting Router Solication Packet timeout
Running IPv6 on STM32H743 using eth_stm32_hal I had to extend the timeout between the attempts to send Router Solicitation packets from 1 second to 2 seconds. Else it looked liked the packet never got sent (checked using tcpdump). Signed-off-by: Stefan Petersen <[email protected]>
1 parent 1db9b00 commit f88784a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

subsys/net/ip/Kconfig.ipv6

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,15 @@ config NET_IPV6_DAD
156156
The value depends on your network needs. DAD should normally
157157
be active.
158158

159+
config NET_IPV6_RS_TIMEOUT
160+
int "Timeout of Router Solicitation messaging"
161+
depends on NET_IPV6_ND
162+
range 1 30
163+
default 1
164+
help
165+
The timeout in seconds between attempts to send a Router
166+
Solicitation message at startup.
167+
159168
config NET_IPV6_RA_RDNSS
160169
bool "Support RA RDNSS option"
161170
depends on NET_IPV6_ND

subsys/net/ip/net_if.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1425,7 +1425,7 @@ static inline void net_if_ipv6_start_dad(struct net_if *iface,
14251425
#endif /* CONFIG_NET_IPV6_DAD */
14261426

14271427
#if defined(CONFIG_NET_IPV6_ND)
1428-
#define RS_TIMEOUT (1U * MSEC_PER_SEC)
1428+
#define RS_TIMEOUT (CONFIG_NET_IPV6_RS_TIMEOUT * MSEC_PER_SEC)
14291429
#define RS_COUNT 3
14301430

14311431
static void rs_timeout(struct k_work *work)

0 commit comments

Comments
 (0)