#1004593 network-manager: [global-dns] searches=... configuration variable appears to have no effect

Package:
network-manager
Source:
network-manager
Description:
network management framework (daemon and userspace tools)
Submitter:
Norbert Bollow
Date:
2022-06-18 19:18:05 UTC
Severity:
normal
Tags:
#1004593#5
Date:
2022-01-30 20:15:40 UTC
From:
To:
Dear Maintainer,

I'm whether this might be a usability bug with the documentation or a
fuctional buf with the software itself:

According to 'man NetworkManager.conf', I expected that creating a
configuration file /etc/NetworkManager/conf.d/deeperpurpose.conf with contents

[global-dns]
searches=example.org

would result in /etc/resolv.conf in a line like

search example.org

However, adding that configuration file has proved ineffective (i.e. it
does not result in any change to /etc/resolv.conf), although it appears
that NetworkManager reads it.
[Syslog entry:
Jan 30 20:19:22 quill NetworkManager[806]: <info>  [1643570362.0630] Read config
: /etc/NetworkManager/NetworkManager.conf (lib: no-mac-addr-change.conf) (etc: d
eeperpurpose.conf)
]

The /etc/resolv.conf file which NetworkManager generates is exactly the
same independently of whether or not that configuration file is added:

# Generated by NetworkManager
search home
nameserver 192.168.1.1
nameserver fe80::125a:f7ff:fe4f:1417%enp14s0

By contrast, I have found that the following are effective ways for adding
a domain name to the "search" line in /etc/resolv.conf or adding to it:
- adding it to /etc/hostname (that adds it to the "search" line after
  the "home" — found out about through taking a look at the source code of
  NetworkManager, see line 1263 and following in
  NetworkManager-1.30.0/src/core/dns/nm-dns-manager.c — is that
  behavior documented at all in the man pages for NetworkMananger?)
- using nm-connection-editor (putting the domain name I want in the
  "additonal search domains" field actually *replaces* the "home"
  which is precisely what I wanted, even though that does not quite
  correspond to the "additonal search domains" field description.)

The issue came up during a fresh install of Debian 11.2 on a laptop
computer. I have also tested (using a separate test system) the
version 1.34.0-2 which is in testing and unstable and found the exact
same behavior.

I suggest that at the very least, the man pages should be updated
with information that explains how to get a desired domain name into
the "search" line of /etc/resolv.conf .

Best regards,

#1004593#10
Date:
2022-01-30 21:52:54 UTC
From:
To:
Am 30.01.22 um 21:15 schrieb Norbert Bollow:

This appears to be
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/354

If you have anything add to the upstream bug report which would make
them consider to reopen it, please follow-up directly at the upstream
bug tracker.

Thanks,
Michael

#1004593#19
Date:
2022-06-18 19:14:55 UTC
From:
To:
This hasn't happened afaics so I'm closing this downstream bug report.

Regards,
Michael