Skip to content

net: Cherry-pick DHCP/DNS improvements #3062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

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 18, 2025 11:26
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 cdc6c324d785742291460e742be261cb37705d65)
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 25084203c29ff5a259b4d161fce62c8c4cb2f323)
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 f1a9ff97cb5694e110c4fc4ea27f6904e9d63622)
Signed-off-by: Robert Lubos <[email protected]>
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.

2 participants