Skip to content

Conversation

@rlubos
Copy link
Contributor

@rlubos rlubos commented Jul 18, 2025

A set of commits improving handling of DNS addresses assigned via DHCP in multi-interface environment.

jukkar added 11 commits July 30, 2025 09:39
Allow user to specify which network interfaces to bind the
server to when reconfiguring the DNS system.

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit 2af5dba)
Signed-off-by: Robert Lubos <[email protected]>
Bind the network interface to the network interface we
have received the DNS servers from. This is now the default.
The previous behavior can be restored by disabling the
CONFIG_NET_DHCPV4_DNS_SERVER_VIA_INTERFACE option.

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit 1224c5a)
Signed-off-by: Robert Lubos <[email protected]>
Bind the network interface to the network interface we
have received the DNS servers from. This is now the default.
The previous behavior can be restored by disabling the
CONFIG_NET_DHCPV6_DNS_SERVER_VIA_INTERFACE option.

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit 248cb3d)
Signed-off-by: Robert Lubos <[email protected]>
…erface

Make sure we cleanup only those DNS servers that belong to
certain network interface when the interface goes down.

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit cb90524)
Signed-off-by: Robert Lubos <[email protected]>
Make sure that uninitialized state is 0 so that we can catch
when the context is not initialized properly.

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit 514cdd6)
Signed-off-by: Robert Lubos <[email protected]>
…ectly

The "net conn" command printed AF_PACKET socket as AF_UNK(3).
Fix this by printing "AF_PACKET" in this case.

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit 57c452f)
Signed-off-by: Robert Lubos <[email protected]>
Make sure received DNS server information is bound to the
wifi network interface.

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit 0e57844)
Signed-off-by: Robert Lubos <[email protected]>
Make sure received DNS server information is bound to the
ppp network interface.

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit 8704b3a)
Signed-off-by: Robert Lubos <[email protected]>
…servers

Remember which DNS server was added by a source like DHCPv4 or v6
message. This will allow system to remove DNS servers that were added by
that source. Then when stopping for example DHCP, we can remove those
specific DNS servers and not leaving DNS servers hanging in the system.

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit cdc6c32)
Signed-off-by: Robert Lubos <[email protected]>
Make sure that we remove only the added DNS servers when
the DHCP is stopped.

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit 2508420)
Signed-off-by: Robert Lubos <[email protected]>
Print information which DNS servers were added by DHCP when
listing DNS servers in "net dns" command. This helps debugging
DNS server issues.

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit f1a9ff9)
Signed-off-by: Robert Lubos <[email protected]>
@rlubos rlubos force-pushed the ncs/cherry-pick-dhcp-dns-fixes branch from bf3a6a2 to 16aa7dd Compare July 30, 2025 07:39
@rlubos rlubos merged commit 6b0b283 into nrfconnect:main Jul 30, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants