Bug 10200 - pump mistakenly alters 'search' in /etc/resolv.conf
pump mistakenly alters 'search' in /etc/resolv.conf
Status: CLOSED NOTABUG
Product: Red Hat Raw Hide
Classification: Retired
Component: pump (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Erik Troan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-03-16 01:26 EST by Glen Turner
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-03-16 08:48:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Glen Turner 2000-03-16 01:26:53 EST
DESCRIPTION

The pump software misunderstands the intent of the "search" directive
in /etc/resolv.conf.  It rewrites the directive based on the reverse
DNS name of the IP address supplied in the DHCP response.

The effect of this is that different DNS searches occur depending
which network a computer is plugged into.  This propogates up to be
apparent to the user: the DNS name "fred" might be resolvable at work
but not at home; the DNS name "www" probably resolves to different
machines.

The "search" directive should be set by the user, and it should
not be changed except by an explicit DHCP response option.

The current software also attempts to establish a reasonable search
list.  Any attempt to do so is doomed to fail, as this result shows:

  User sets in /etc/resolv.conf:

  > search aarnet.edu.au adelaide.edu.au

  pump replaces it with:

  > search its.adelaide.edu.au adelaide.edu.au edu.au

Searching in "edu.au" is just pointless -- the equivalent of searching
in ".com".  Pump cannot guess if the user want to resolve names in an
unrelated domain first: for example, IBM staff might get an IP address
in "ibm.net" but want to resolve names in "ibm.com".


FIX

Do not alter any "search" lines in /etc/resolv.conf.


DEMONSTRATION

Network has multiple ISC DHCP servers with static mapping of MAC and
IP addresses.

Mar 16 15:54:05 bush pumpd[528]: starting at (uptime 0 days, 0:00:26) Thu
Mar 16 15:54:05 2000
Mar 16 15:54:05 bush pumpd[528]: PUMP: sending discover
Mar 16 15:54:05 bush pumpd[528]: breq: opcode: 1
Mar 16 15:54:05 bush pumpd[528]: breq: hw: 1
Mar 16 15:54:05 bush pumpd[528]: breq: hwlength: 6
Mar 16 15:54:05 bush pumpd[528]: breq: hopcount: 0
Mar 16 15:54:05 bush pumpd[528]: breq: id: 0x2f25a4f2
Mar 16 15:54:05 bush pumpd[528]: breq: secs: 0
Mar 16 15:54:05 bush pumpd[528]: breq: flags: 0x0000
Mar 16 15:54:05 bush pumpd[528]: breq: ciaddr: 0.0.0.0
Mar 16 15:54:05 bush pumpd[528]: breq: yiaddr: 0.0.0.0
Mar 16 15:54:05 bush pumpd[528]: breq: server_ip: 0.0.0.0
Mar 16 15:54:05 bush pumpd[528]: breq: bootp_gw_ip: 0.0.0.0
Mar 16 15:54:06 bush pumpd[528]: breq: hwaddr:
Mar 16 15:54:06 bush pumpd[528]: breq: servername:
Mar 16 15:54:06 bush pumpd[528]: breq: bootfile:
Mar 16 15:54:06 bush pumpd[528]: breq: vendor: 0x63 0x53 0x82 0x63
Mar 16 15:54:06 bush pumpd[528]: breq: vendor:  53   1 0x01
Mar 16 15:54:06 bush pumpd[528]: breq: vendor: 0xff

This packet gets no response, as the switch port is still in IEEE
802.1D spanning tree hold down.  pumpd retries 32S later (it's 29S in
the log, but that's syslog doing caching).  This is a really good
choice, as the default 802.1D port hold down is 30S.

Mar 16 15:54:35 bush pumpd[528]: PUMP: sending discover
Mar 16 15:54:35 bush pumpd[528]: breq: opcode: 1
Mar 16 15:54:35 bush pumpd[528]: breq: hw: 1
Mar 16 15:54:35 bush pumpd[528]: breq: hwlength: 6
Mar 16 15:54:35 bush pumpd[528]: breq: hopcount: 0
Mar 16 15:54:35 bush pumpd[528]: breq: id: 0x2f25a4d0
Mar 16 15:54:35 bush pumpd[528]: breq: secs: 0
Mar 16 15:54:35 bush pumpd[528]: breq: flags: 0x0000
Mar 16 15:54:35 bush pumpd[528]: breq: ciaddr: 0.0.0.0
Mar 16 15:54:35 bush pumpd[528]: breq: yiaddr: 0.0.0.0
Mar 16 15:54:35 bush pumpd[528]: breq: server_ip: 0.0.0.0
Mar 16 15:54:35 bush pumpd[528]: breq: bootp_gw_ip: 0.0.0.0
Mar 16 15:54:35 bush pumpd[528]: breq: hwaddr:
Mar 16 15:54:35 bush pumpd[528]: breq: servername:
Mar 16 15:54:35 bush pumpd[528]: breq: bootfile:
Mar 16 15:54:35 bush pumpd[528]: breq: vendor: 0x63 0x53 0x82 0x63
Mar 16 15:54:35 bush pumpd[528]: breq: vendor:  53   1 0x01
Mar 16 15:54:35 bush pumpd[528]: breq: vendor: 0xff
Mar 16 15:54:38 bush pumpd[528]: bresp: opcode: 2
Mar 16 15:54:38 bush pumpd[528]: bresp: hw: 1
Mar 16 15:54:38 bush pumpd[528]: bresp: hwlength: 6
Mar 16 15:54:38 bush pumpd[528]: bresp: hopcount: 0
Mar 16 15:54:38 bush pumpd[528]: bresp: id: 0x2f25a4d0
Mar 16 15:54:38 bush pumpd[528]: bresp: secs: 0
Mar 16 15:54:38 bush pumpd[528]: bresp: flags: 0x0000
Mar 16 15:54:38 bush pumpd[528]: bresp: ciaddr: 0.0.0.0
Mar 16 15:54:38 bush pumpd[528]: bresp: yiaddr: 129.127.134.89
Mar 16 15:54:38 bush pumpd[528]: bresp: server_ip: 129.127.40.3
Mar 16 15:54:38 bush pumpd[528]: bresp: bootp_gw_ip: 129.127.134.253
Mar 16 15:54:38 bush pumpd[528]: bresp: hwaddr:
Mar 16 15:54:38 bush pumpd[528]: bresp: servername:
Mar 16 15:54:38 bush pumpd[528]: bresp: bootfile:
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor: 0x63 0x53 0x82 0x63
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:  53   1 0x02
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:  54   4 0x81 0x7f 0x28 0x0
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:  51   4 0x00 0x01 0x51 0x8
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:  58   4 0x00 0x00 0xa8 0xc
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:  59   4 0x00 0x01 0x27 0x5
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:   1   4 0xff 0xff 0xff 0x0
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:   3   4 0x81 0x7f 0x86 0xf
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:   4   4 0x81 0x7f 0x86 0xf
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:   6  12 0x81 0x7f 0x28 0x0
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor: ++++++ 0xcb 0x15 0x25 0x12
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor: ++++++ 0x81 0x7f 0x1c 0x04
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor: 0xff
Mar 16 15:54:38 bush pumpd[528]: got dhcp offer
Mar 16 15:54:38 bush pumpd[528]: PUMP: sending second discover
Mar 16 15:54:38 bush pumpd[528]: breq: opcode: 1
Mar 16 15:54:38 bush pumpd[528]: breq: hw: 1
Mar 16 15:54:38 bush pumpd[528]: breq: hwlength: 6
Mar 16 15:54:38 bush pumpd[528]: breq: hopcount: 0
Mar 16 15:54:38 bush pumpd[528]: breq: id: 0x2f25a4d0
Mar 16 15:54:38 bush pumpd[528]: breq: secs: 0
Mar 16 15:54:38 bush pumpd[528]: breq: flags: 0x0000
Mar 16 15:54:38 bush pumpd[528]: breq: ciaddr: 0.0.0.0
Mar 16 15:54:38 bush pumpd[528]: breq: yiaddr: 0.0.0.0
Mar 16 15:54:38 bush pumpd[528]: breq: server_ip: 0.0.0.0
Mar 16 15:54:38 bush pumpd[528]: breq: bootp_gw_ip: 0.0.0.0
Mar 16 15:54:38 bush pumpd[528]: breq: hwaddr:
Mar 16 15:54:38 bush pumpd[528]: breq: servername:
Mar 16 15:54:38 bush pumpd[528]: breq: bootfile:
Mar 16 15:54:38 bush pumpd[528]: breq: vendor: 0x63 0x53 0x82 0x63
Mar 16 15:54:38 bush pumpd[528]: breq: vendor:  57   2 0x02 0x24
Mar 16 15:54:38 bush pumpd[528]: breq: vendor:  55  11 0x01 0x03 0x06 0x0
Mar 16 15:54:38 bush pumpd[528]: breq: vendor: ++++++ 0x1c 0x0c 0x07 0x09
Mar 16 15:54:38 bush pumpd[528]: breq: vendor: ++++++ 0x2a 0x30 0x31
Mar 16 15:54:38 bush pumpd[528]: breq: vendor:  12   5 0x62 0x75 0x73 0x6
Mar 16 15:54:38 bush pumpd[528]: breq: vendor: ++++++ 0x00
Mar 16 15:54:38 bush pumpd[528]: breq: vendor:  51   4 0x00 0x00 0xa8 0xc
Mar 16 15:54:38 bush pumpd[528]: breq: vendor:  53   1 0x01
Mar 16 15:54:38 bush pumpd[528]: breq: vendor: 0xff
Mar 16 15:54:38 bush pumpd[528]: bresp: opcode: 2
Mar 16 15:54:38 bush pumpd[528]: bresp: hw: 1
Mar 16 15:54:38 bush pumpd[528]: bresp: hwlength: 6
Mar 16 15:54:38 bush pumpd[528]: bresp: hopcount: 0
Mar 16 15:54:38 bush pumpd[528]: bresp: id: 0x2f25a4d0
Mar 16 15:54:38 bush pumpd[528]: bresp: secs: 0
Mar 16 15:54:38 bush pumpd[528]: bresp: flags: 0x0000
Mar 16 15:54:38 bush pumpd[528]: bresp: ciaddr: 0.0.0.0
Mar 16 15:54:38 bush pumpd[528]: bresp: yiaddr: 129.127.134.89
Mar 16 15:54:38 bush pumpd[528]: bresp: server_ip: 129.127.40.3
Mar 16 15:54:38 bush pumpd[528]: bresp: bootp_gw_ip: 129.127.134.253
Mar 16 15:54:38 bush pumpd[528]: bresp: hwaddr:
Mar 16 15:54:38 bush pumpd[528]: bresp: servername:
Mar 16 15:54:38 bush pumpd[528]: bresp: bootfile:
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor: 0x63 0x53 0x82 0x63
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:  53   1 0x02
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:  54   4 0x81 0x7f 0x28 0x0
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:  51   4 0x00 0x01 0x51 0x8
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:   1   4 0xff 0xff 0xff 0x0
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:   3   4 0x81 0x7f 0x86 0xf
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:   6  12 0x81 0x7f 0x28 0x0
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor: ++++++ 0xcb 0x15 0x25 0x12
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor: ++++++ 0x81 0x7f 0x1c 0x04
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor: 0xff
Mar 16 15:54:38 bush pumpd[528]: PUMP: got an offer
Mar 16 15:54:38 bush pumpd[528]: breq: opcode: 1
Mar 16 15:54:38 bush pumpd[528]: breq: hw: 1
Mar 16 15:54:38 bush pumpd[528]: breq: hwlength: 6
Mar 16 15:54:38 bush pumpd[528]: breq: hopcount: 0
Mar 16 15:54:38 bush pumpd[528]: breq: id: 0x2f25a4d0
Mar 16 15:54:38 bush pumpd[528]: breq: secs: 0
Mar 16 15:54:38 bush pumpd[528]: breq: flags: 0x0000
Mar 16 15:54:38 bush pumpd[528]: breq: ciaddr: 0.0.0.0
Mar 16 15:54:38 bush pumpd[528]: breq: yiaddr: 0.0.0.0
Mar 16 15:54:38 bush pumpd[528]: breq: server_ip: 0.0.0.0
Mar 16 15:54:38 bush pumpd[528]: breq: bootp_gw_ip: 0.0.0.0
Mar 16 15:54:38 bush pumpd[528]: breq: hwaddr:
Mar 16 15:54:38 bush pumpd[528]: breq: servername:
Mar 16 15:54:38 bush pumpd[528]: breq: bootfile:
Mar 16 15:54:38 bush pumpd[528]: breq: vendor: 0x63 0x53 0x82 0x63
Mar 16 15:54:38 bush pumpd[528]: breq: vendor:  57   2 0x02 0x24
Mar 16 15:54:38 bush pumpd[528]: breq: vendor:  55  11 0x01 0x03 0x06 0x0
Mar 16 15:54:38 bush pumpd[528]: breq: vendor: ++++++ 0x1c 0x0c 0x07 0x09
Mar 16 15:54:38 bush pumpd[528]: breq: vendor: ++++++ 0x2a 0x30 0x31
Mar 16 15:54:38 bush pumpd[528]: breq: vendor:  12   5 0x62 0x75 0x73 0x6
Mar 16 15:54:38 bush pumpd[528]: breq: vendor: ++++++ 0x00
Mar 16 15:54:38 bush pumpd[528]: breq: vendor:  51   4 0x00 0x00 0xa8 0xc
Mar 16 15:54:38 bush pumpd[528]: breq: vendor:  53   1 0x03
Mar 16 15:54:38 bush pumpd[528]: breq: vendor:  54   4 0x81 0x7f 0x28 0x0
Mar 16 15:54:38 bush pumpd[528]: breq: vendor:  50   4 0x81 0x7f 0x86 0x5
Mar 16 15:54:38 bush pumpd[528]: breq: vendor: 0xff
Mar 16 15:54:38 bush pumpd[528]: bresp: opcode: 2
Mar 16 15:54:38 bush pumpd[528]: bresp: hw: 1
Mar 16 15:54:38 bush pumpd[528]: bresp: hwlength: 6
Mar 16 15:54:38 bush pumpd[528]: bresp: hopcount: 0
Mar 16 15:54:38 bush pumpd[528]: bresp: id: 0x2f25a4d0
Mar 16 15:54:38 bush pumpd[528]: bresp: secs: 0
Mar 16 15:54:38 bush pumpd[528]: bresp: flags: 0x0000
Mar 16 15:54:38 bush pumpd[528]: bresp: ciaddr: 0.0.0.0
Mar 16 15:54:38 bush pumpd[528]: bresp: yiaddr: 129.127.134.89
Mar 16 15:54:38 bush pumpd[528]: bresp: server_ip: 129.127.40.3
Mar 16 15:54:38 bush pumpd[528]: bresp: bootp_gw_ip: 129.127.134.253
Mar 16 15:54:38 bush pumpd[528]: bresp: hwaddr:
Mar 16 15:54:38 bush pumpd[528]: bresp: servername:
Mar 16 15:54:38 bush pumpd[528]: bresp: bootfile:
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor: 0x63 0x53 0x82 0x63
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:  53   1 0x05
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:  54   4 0x81 0x7f 0x28 0x0
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:  51   4 0x00 0x01 0x51 0x8
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:   1   4 0xff 0xff 0xff 0x0
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:   3   4 0x81 0x7f 0x86 0xf
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor:   6  12 0x81 0x7f 0x28 0x0
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor: ++++++ 0xcb 0x15 0x25 0x12
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor: ++++++ 0x81 0x7f 0x1c 0x04
Mar 16 15:54:38 bush pumpd[528]: bresp: vendor: 0xff
Mar 16 15:54:38 bush pumpd[528]: PUMP: got lease
Mar 16 15:54:38 bush pumpd[528]: intf: device: eth0
Mar 16 15:54:38 bush pumpd[528]: intf: set: 416
Mar 16 15:54:38 bush pumpd[528]: intf: bootServer: 129.127.40.3
Mar 16 15:54:38 bush pumpd[528]: intf: reqLease: 43200
Mar 16 15:54:38 bush pumpd[528]: intf: bootFile: (null)
Mar 16 15:54:38 bush pumpd[528]: intf: ip: 129.127.134.89
Mar 16 15:54:38 bush pumpd[528]: intf: next server: 129.127.40.3
Mar 16 15:54:38 bush pumpd[528]: intf: netmask: 255.255.255.0
Mar 16 15:54:38 bush pumpd[528]: intf: gateway: 129.127.134.253
Mar 16 15:54:38 bush pumpd[528]: intf: dnsServers[0]: 129.127.40.3
Mar 16 15:54:38 bush pumpd[528]: intf: dnsServers[1]: 203.21.37.18
Mar 16 15:54:38 bush pumpd[528]: intf: dnsServers[2]: 129.127.28.4
Mar 16 15:54:38 bush pumpd[528]: intf: numDns: 3
Mar 16 15:54:38 bush pumpd[528]: intf: broadcast: 129.127.134.255
Mar 16 15:54:38 bush pumpd[528]: intf: network: 129.127.134.0
Mar 16 15:54:38 bush pumpd[528]: configured interface eth0
Mar 16 15:54:38 bush cardmgr[438]: + Determining IP information for eth0...
done.

gives a /etc/resolv.conf containing:

> search its.adelaide.edu.au adelaide.edu.au edu.au
> nameserver 129.127.40.3
> nameserver 203.21.37.18
> nameserver 129.127.28.4

where the reserve DNS entry of the assigned IP address is

> # dig -x 129.127.134.89
...
> 89.134.127.129.in-addr.arpa.  1D IN PTR  bush.its.adelaide.edu.au.
...


ENVIRONMENT

A "rawhide" system.  pump-0.7.8-1 was built with an "rpm --rebuild"
from the SRPM.  gcc-2.95.2-3 and glibc-2.1.3-14.

Dell Latitude CPx 4400 notebook with 3Com 3CCFE575CT Cyclone CardBus
NIC attached to HP ProCurve 2424M switch (autonegotiated to 100BaseTX
full duplex.  Switch port configured for IEEE 802.1D spanning tree
hold down, no security, no QoS, no VLAN trunking).


TEST

> # /etc/rc.d/init.d/network stop
> # vi /etc/resolv.conf

  Alter line to

  search adelaide.edu.au aarnet.edu.au

> # reboot
...
> # cat /etc/resolv.conf

  "search" line should be unchanged, currently

> search its.adelaide.edu.au adelaide.edu.au edu.au
> nameserver 129.127.40.3
> nameserver 203.21.37.18
> nameserver 129.127.28.4
Comment 1 Nalin Dahyabhai 2000-03-16 08:16:59 EST
The latest version of pump supports the "domainsearch" option in /etc/pump.conf,
which will let you override the default behavior.
Comment 2 Erik Troan 2000-03-16 08:48:59 EST
this is easily turned off via /etc/pump.conf (see man page)

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