Skip to content

Commit 7e37fd7

Browse files
committed
net: connection: The connection logic was not init properly
We need to initialize the connection.c for UDP, TCP, PACKET socket and CANBUS sockets. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent 1e98928 commit 7e37fd7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

subsys/net/ip/net_core.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,9 +426,13 @@ static inline void l3_init(void)
426426

427427
net_ipv4_autoconf_init();
428428

429-
#if defined(CONFIG_NET_UDP) || defined(CONFIG_NET_TCP)
430-
net_conn_init();
431-
#endif
429+
if (IS_ENABLED(CONFIG_NET_UDP) ||
430+
IS_ENABLED(CONFIG_NET_TCP) ||
431+
IS_ENABLED(CONFIG_NET_SOCKETS_PACKET) ||
432+
IS_ENABLED(CONFIG_NET_SOCKETS_CAN)) {
433+
net_conn_init();
434+
}
435+
432436
net_tcp_init();
433437

434438
net_route_init();

0 commit comments

Comments
 (0)