Bug 2218450 - The order of name servers in resolv.conf is wrong after reconnecting a device
Summary: The order of name servers in resolv.conf is wrong after reconnecting a device
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: NetworkManager
Version: 8.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: NetworkManager Development Team
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-29 08:00 UTC by Beniamino Galvani
Modified: 2023-08-08 10:21 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-08 10:20:17 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker NMT-707 0 None None None 2023-08-08 10:21:10 UTC
Red Hat Issue Tracker RHELPLAN-164808 0 None None None 2023-08-08 10:21:23 UTC
freedesktop.org Gitlab NetworkManager NetworkManager merge_requests 1683 0 None merged dns: fix tracking of best ip config 2023-08-03 16:02:45 UTC

Description Beniamino Galvani 2023-06-29 08:00:27 UTC
This bug was initially created as a copy of Bug #2218448

Description of problem:

 After reconnecting a device, the order of name servers in resolv.conf is wrong

 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1331

Version-Release number of selected component (if applicable):

 All NM versions from 1.32 to 1.43.10.

How reproducible:
 100%

Steps to Reproduce:
 nmcli connection add type dummy con-name dummy-dummy1 ifname dummy1 \
                      ip4 172.25.1.1/24 gw4 172.25.1.254 ipv4.dns 172.25.1.53 \
                      autoconnect no ipv4.route-metric 100 ipv6.method disabled
 nmcli connection add type dummy con-name dummy-dummy2 ifname dummy2 \
                      ip4 172.25.2.1/24 gw4 172.25.2.254 ipv4.dns 172.25.2.53 \
                      autoconnect no ipv4.route-metric 200 ipv6.method disabled

 nmcli connection up dummy-dummy1
 nmcli connection up dummy-dummy2

 # now dummy1 is best

 nmcli connection down dummy-dummy1

 # now dummy2 is best

 nmcli connection up dummy-dummy1

 # due to the bug, now both dummy1 and dummy2 are best

 cat /etc/resolv.conf

Actual results:

 The first name server is 172.25.2.53 in resolv.conf

Expected results:

 The first name server is 172.25.1.53 because dummy1 has the best default route

Additional info:

 Upstream fix: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1683

Comment 1 sfaye 2023-08-08 10:20:17 UTC
Closing as this is already fixed upstream.


Note You need to log in before you can comment on or make changes to this bug.