Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 84012 - pump does not always exit when there 0 managed interfaces
Summary: pump does not always exit when there 0 managed interfaces
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: pump
Version: 7.3
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Eido Inoue
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-02-10 23:10 UTC by Ken Mayer
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-03-11 23:25:01 UTC


Attachments (Terms of Use)
fixes bug (deleted)
2003-02-10 23:12 UTC, Ken Mayer
no flags Details | Diff

Description Ken Mayer 2003-02-10 23:10:58 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020916

Description of problem:
On my laptop, pump sometimes doesn't configure the interface for reasons
unrelated to pump (disconnected cable, etc.). It requires a "cardctl eject" to
fix, but since pump failed to configure the interface, it also fails when
/sbin/ifdown calls "pump -r" to release it. That leaves a pump daemon running
around with no manged interfaces. On the next insert, /sbin/ifup calls pump
again, and starts another pump daemon. If I am having problems getting the
network configured, I can have a bunch pump's lieing about, like Imelda's closet.

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


How reproducible:
Always

Steps to Reproduce:
1. Insert a PCMCIA ethernet card into a slot, but do not connect to LAN
2. Wait for pump to give up
3. cardctl eject
4. cardctl insert
    

Actual Results:  There are now 2 "/sbin/pump -i eth0" proc's running

Expected Results:  The first pump should have quit when the card was ejected.

Additional info:

Here's a patch:
--- pump-0.8.11/pump.c.orig     Thu Mar  1 00:15:22 2001
+++ pump-0.8.11/pump.c  Mon Feb 10 13:58:34 2003
@@ -522,19 +522,19 @@
                else {
                    cmd.u.result = pumpDhcpRelease(intf + i);
                    callScript(o->script, PUMP_SCRIPT_DOWN, intf + i);
-                   if (numInterfaces == 1) {
-                       cmd.type = CMD_RESULT;
-                       write(conn, &cmd, sizeof(cmd));
-
-                       syslog(LOG_INFO, "terminating as there are no "
-                               "more devices under management");
-
-                       exit(0);
-                   }
 
                    intf[i] = intf[numInterfaces - 1];
                    numInterfaces--;
                }
+               if (numInterfaces <= 0) {
+                   cmd.type = CMD_RESULT;
+                   write(conn, &cmd, sizeof(cmd));
+
+                   syslog(LOG_INFO, "terminating as there are no "
+                                    "more devices under management");
+
+                   exit(0);
+               }
                break;
 
              case CMD_REQSTATUS:

Comment 1 Ken Mayer 2003-02-10 23:12:01 UTC
Created attachment 89981 [details]
fixes bug

Comment 2 Eido Inoue 2003-03-11 23:25:01 UTC
thanks for the patch. tested and included in cvs


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