NM-generated resolv.conf contains both "domain" and "search" even though the second option supersedes the first one

Bug #1005304 reported by janl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Triaged
Low
Unassigned

Bug Description

$ cat /etc/resolv.conf
# Generated by NetworkManager
domain langfeldt.net
search langfeldt.net
nameserver 192.168.1.1

man resolv.conf:

       The domain and search keywords are mutually exclusive. If more than one instance of these keywords is
       present, the last instance wins.

To avoid surprising people that don't know better (or changes in named.conf) and to observe the Robustness principle (http://en.wikipedia.org/wiki/Robustness_principle) or some unintended change in which instance of the keywords that win, the file should probably only use one of those. The DHCP option in question here is setting the dns domain and so the domain line should be generated. I have been told that there now is a DHCP option for the search line as well. But in any case they should not both be generated.

Regards,
  Nicolai

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: network-manager 0.9.4.0-0ubuntu4
ProcVersionSignature: Ubuntu 3.2.0-24.39-generic 3.2.16
Uname: Linux 3.2.0-24-generic x86_64
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
CRDA:
 country NO:
  (2402 - 2482 @ 40), (N/A, 20)
  (5170 - 5250 @ 40), (N/A, 20)
  (5250 - 5330 @ 40), (N/A, 20), DFS
  (5490 - 5710 @ 40), (N/A, 27), DFS
Date: Sun May 27 23:54:44 2012
IpRoute:
 default via 192.168.1.1 dev wlan0 proto static
 169.254.0.0/16 dev wlan0 scope link metric 1000
 192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.9 metric 2
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
ProcEnviron:
 LANGUAGE=
 TERM=xterm
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: network-manager
UpgradeStatus: Upgraded to precise on 2012-05-20 (7 days ago)
nmcli-dev:
 DEVICE TYPE STATE DBUS-PATH
 eth0 802-3-ethernet unavailable /org/freedesktop/NetworkManager/Devices/1
 wlan0 802-11-wireless connected /org/freedesktop/NetworkManager/Devices/0
nmcli-nm:
 RUNNING VERSION STATE NET-ENABLED WIFI-HARDWARE WIFI WWAN-HARDWARE WWAN
 running 0.9.4.0 connected enabled enabled enabled enabled disabled

Revision history for this message
janl (janl) wrote :
Thomas Hood (jdthood)
summary: - "domain" and "search" are mutually exclusive in resolv.conf
+ NM-generated resolv.conf contains both "domain" and "search" even though
+ the second option supersedes the first one
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Actual impact is low to minimal, so setting the bug as Triaged/Low. This should be relatively easy to debug in NM code and to fix; but it will need care just to make sure things don't get busted by changes; so it would benefit upstream input.

Changed in network-manager (Ubuntu):
status: New → Triaged
importance: Undecided → Low
tags: added: bitesize
Revision history for this message
Thomas Hood (jdthood) wrote :

Also, when the file is piped to resolvconf (as is now the default), resolvconf eliminates the superfluous "domain" line.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.