Bug 2790 - Dynamic IP assignment lacks needed options.
Dynamic IP assignment lacks needed options.
Product: Red Hat Linux
Classification: Retired
Component: pump (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Erik Troan
: 3012 3094 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 1999-05-13 12:57 EDT by jeld
Modified: 2008-05-01 11:37 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1999-08-31 18:30:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description jeld 1999-05-13 12:57:44 EDT
I run my RH box on a network where IP addresses are assigned
by DHCP. Also DHCP sends information on DNS servers. bump
would not pick up DNS info from DHCP and would overwrite
/etc/resolv.conf if I edit it manually. Had to change
/etc/sysconfig/ifup to correct the problem.
Here is the diff of my ifup file and the original:
---------------------cut here------------------------------
*** /etc/sysconfig/network-scripts/ifup.old	Thu May 13
12:23:13 1999
--- /etc/sysconfig/network-scripts/ifup	Thu May 13 12:35:04
*** 82,94 ****

  if [ -n "$PUMP" ]; then
!     echo -n "Determining IP information for $DEVICE..."
      if /sbin/pump -i $DEVICE ; then
  	echo " done."
  	echo " failed."
  	exit 1
      if [ -z "$NETMASK" ]; then
  	eval `/bin/ipcalc --netmask ${IPADDR}`
--- 82,104 ----

  if [ -n "$PUMP" ]; then
!     echo -n "Determining IP information for $DEVICE using
! 	if [ $BOOTPROTO = "bootp" ]; then
      	if /sbin/pump -i $DEVICE ; then
  			echo " done."
  			echo " failed."
  			exit 1
+ 	elif [ $BOOTPROTO = "dhcp" ]; then
+ 		/sbin/dhcpcd $DEVICE
+ 		if [ -e /var/run/dhcpcd-$DEVICE.pid ]; then
+ 			echo " done."
+ 		else
+ 			echo " failed."
+ 			exit 1
+ 		fi
+ 	fi
      if [ -z "$NETMASK" ]; then
  	eval `/bin/ipcalc --netmask ${IPADDR}`
Comment 1 David Lawrence 1999-05-18 16:44:59 EDT
Pump should work properly for obtaining this information from a DHCP
server, if it does not then it is a bug. If you are receiving DHCP
information from a NT server running dhcp services, there was a known
bug that has been fixed. You should get the updated pump package from
Comment 2 Jeff Johnson 1999-05-29 11:34:59 EDT
*** Bug 3094 has been marked as a duplicate of this bug. ***

I have made a bug report concerning usage of pump to
configure DHCP/BOOTP interfaces. You have changed the status
of the bug to resolved. I have upgraded to new pump RPM. I
have reinstalled my initscripts RPM to get original ifup and
ifdown scripts. I have reloaded network. Pump overwrote the
/etc/resolv.conf with info provided by DHCP server. I have a
caching-only named running. I want to be the first
in the list of nameservers in /etc/resolv.conf. There is no
switch in pump to disable configuration of /etc/resolv.conf.
I do not see any good reason for the pump to exist at all,
for there are regular DHCP and BOOTP clients which are not
too difficult to run. IMHO pump removes important
functionality without providing any useful features or
anything worth using it. Thank you. I think any linux pro
will agree that it is better to make one update to
initscripts then 5 updates to pump. The name "pump" is ugly
Comment 3 Jeff Johnson 1999-05-29 11:35:59 EDT
*** Bug 3012 has been marked as a duplicate of this bug. ***

I have a linux box with two interfaces and a ppp
connection.  I routinely connect to a commercial intranet
via ppp.  I have a local net for which I have a static
(private) IP address.  I am also connected to RoadRunner
which requires DHCP nic configuration.  Roadrunner and the
ppp intranet both use split DNS configurations, i.e. DNS
resolution from the root down will not yield correct
information for inside these intranets.  In addition, I have
a private network.  To handle this I configure a local
nameserver which is a secondary to the ppp intranet servers,
and forwards to the Roadrunner servers.

  dhcpcd and pump both overwrite /etc/resolv.conf directly
from the binaries which prevents me from disabling the
behavior.  dhcpcd at least uses /etc/dhcpcd/resolv.conf
whereas pump does not.  They should allow this behavior to
be suppressed.

------- Additional Comments From notting@redhat.com  05/24/99 15:44 -------
chattr +i /etc/resolv.conf. :)
Comment 4 magill 1999-05-31 23:07:59 EDT

  Here is a patch to suppress the overwrite of /etc/resolv.conf by
pump.  I have been using it successfully on my machine for almost a

  The init script change above forces dhcpcd to be used for dhcp
resolution rather than pump.  This means you have two dynamic
resolvers which is less than desireable.  Furthermore, dhcpcd tries
very hard to overwrite /etc/resolv.conf too, so even if you use it you
have still not solved the problem.  I worked around the problem with
dhcpcd by overwriting the generated resolv.conf with my copy.  (An
ugly hack but it mostly worked.)

  The real problem here is that both of these dynamic IP resolvers are
trying to do too much.  Their job is to get an IP address for an
interface.  They should make available the other information,
nameservers etc., but should not be enforcing that information.

  The patch below fixes my bug (3012) by allowing me to suppress the
resolver configuration since I'm not interested in any DNS information
provided by DHCP.

  However, Bug 3094 is actually more complex than mine because he
wants to integrate information from DHCP into his resolv.conf.  His
problem should be fixed by a patch to the init scripts that allows him
to write a local dns config script where he can query DHCP nameserver
info and write his resolv.conf.



diff -c pump-0.6.4/pump.c pump-nodns/pump.c
*** pump-0.6.4/pump.c	Mon Apr 19 15:35:37 1999
--- pump-nodns/pump.c	Tue May 25 18:09:56 1999
*** 163,168 ****
--- 163,176 ----
      } u;

+ /* I tried to find a less intrusive way to work this into doDhcp()
+    I couldn't find one.  I thought about using the command struct
+    it isn't passed in I thought about adding more parameters to the
+    call stack above doDhcp(), but that seemed even more intrusive */
+ static int suppress_resolv = 0;
  static char * doDhcp(int timeout, char * device, int flags, int
  		     struct intfInfo * intf);

*** 1070,1076 ****
      if (intf->set & NETINFO_HAS_GATEWAY) {
  	chptr = setupDefaultGateway(&intf->gateway, s);
!     setupDns(intf);


--- 1078,1086 ----
      if (intf->set & NETINFO_HAS_GATEWAY) {
  	chptr = setupDefaultGateway(&intf->gateway, s);
!     if (! suppress_resolv) {
!       setupDns(intf);
!     }


*** 1328,1333 ****
--- 1338,1345 ----
      struct command cmd, response;
      int cont;
      struct poptOption options[] = {
+ 	    { "nodns", '\0', POPT_ARG_NONE, &suppress_resolv, 0,
+ 			N_("Do NOT use DHCP specified nameserver"), NULL },
              { "interface", 'i', POPT_ARG_STRING, &device, 0,
  			N_("Interface to configure (normally eth0)"),
  			N_("iface") },
Comment 5 Bill Nottingham 1999-08-31 18:30:59 EDT
This is fixed in the errata ; pump now has directives
in /etc/pump.conf to not overwrite /etc/resolv.conf.

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