Bug 59875 - Changing network interface configuration leaves old IP address intact and pump daemon running
Summary: Changing network interface configuration leaves old IP address intact and pum...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 7.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-02-14 11:21 UTC by Pekka Pessi
Modified: 2014-03-17 02:25 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-02-14 15:53:53 UTC
Embargoed:


Attachments (Terms of Use)

Description Pekka Pessi 2002-02-14 11:21:08 UTC
Description of Problem:

I use two configurations with eth0 interface of my laptop, one with fixed IP and
another with DHCPD (when I'm roaming). The configurations are
/etc/sysconfig/network-scripts/ifcfg-eth0 and
/etc/sysconfig/network-scripts/ifcfg-eth0.dhcp. 

When changing back to configuration with fixed IP address (ifup eth0) from DHCP
configuration (ifup eth0.dhcp), the pump daemon is left running and the IP
address the pump ackquired is still assigned to the interface. In random
intervals, pump overwrites the /etc/resolv.conf and when its lease expires, it
removes the fixed IP address.

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

initscripts-6.40-1

How Reproducible:

Always.

Steps to Reproduce:

1. On a host having fixed IP address on eth0, create alternative configuration
using pump, e.g., 
cat > /etc/sysconfig/network-scripts/ifcfg-eth0.dhcp << EOF
DEVICE=eth0
USERCTL=yes
ONBOOT=no
BOOTPROTO=dhcp
EOF
2. Install pump (and uninstall dhcpcd): rpm -i pump-0.8.11-7* ; rpm -e dhcpcd
3. Activate dhcp configuration: ifup eth0.dhcp
4. Reactivate fixed IP configuration: ifup eth0

Actual Results:

At step 4, adding default route causes a complaint as the route from DHCP still
exists. Both IP addresses, one from DHCP and the fixed IP address, are active
Pump is still running.

$ ip addr show dev eth0
$ pidof pump

Expected Results:

Address from DHCP is released and pump is killed.

Additional Information:
Apply this patch: 
--- /sbin/ifup.virgin	Tue Sep  4 07:02:08 2001
+++ /sbin/ifup	Thu Feb 14 13:17:27 2002
@@ -181,6 +181,15 @@
 
     [ -n "$FWHACK" ] && ipchains -D input -s 0/0 53 -d 0/0 1025:65535 -p udp -j
ACCEPT
 else 
+
+    # Kill pump
+    if [ -x /sbin/pump ] ;then
+
/sbin/pump -i ${DEVICE} --release --kill
+    fi
+
+    # Remove existing addresses
+    ip addr flush dev ${DEVICE} 2> /dev/null
+    
     if [ -z "${IPADDR}" ]; then
          # enable device without IP, useful for e.g. PPPoE
 	 ip link set ${DEVICE} up

Comment 1 Bill Nottingham 2002-02-14 15:53:48 UTC
This is fixed in 6.40.2-1 and later.


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