From Bugzilla Helper: User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.18 i686) If the dhcp server doesn't give pump a renewal on the lease then pump will attempt to obtain a new one (only once in the current code but see bug-19502 about that), however even if it does get a lease it doesn't seem to set the interface back up correctly. pumpDhcpRun() calls pumpPrepareInterface() which zaps the current address so we need to call pumpSetupInterface() and since the address/routing may be different we should probably also call the code to setup the default gateway, dns etc. Reproducible: Always Steps to Reproduce: 1. Make a dhcp server refuse to renew lease 2. wait for pump to try to renew 3. when it fails and does a fresh dhcpdiscover it seems to leave the interface with no IP address (though marked up). Actual Results: n/a Expected Results: working interface here is a patch which I think does the right thing, but I'm waiting for a dhcp server timeout to be sure. Note that this includes (since I'm lazy) the one char typo mentioned in 19501 (+= should be =) since I think that logic sounds correct. Also this moves the callscript in the 'case CMD_STARTIFACE' to only happen if we obtained a lease, since calling it if we didn't get a lease seems weird. *** pump.c.orig Mon Aug 14 13:51:20 2000 --- pump.c Thu Mar 29 05:42:46 2001 *************** *** 368,372 **** intf[closest].device); ! if ((intf[closest].renewAt += pumpUptime() + 30) > intf[closest].leaseExpiration) { o = overrides; --- 368,372 ---- intf[closest].device); ! if ((intf[closest].renewAt = pumpUptime() + 30) > intf[closest].leaseExpiration) { o = overrides; *************** *** 396,401 **** numInterfaces--; } else { ! callScript(o->script, PUMP_SCRIPT_NEWLEASE, ! &intf[closest]); } } --- 396,414 ---- numInterfaces--; } else { ! /* add code to bring interface back up ! since pumpDhcpRun may have called ! pumpDisableInterface 2001-03-29 JSP */ ! ! pumpSetupInterface(intf + closest); ! syslog(LOG_INFO, "re-configured interface %s", intf[closest].device); ! ! if (intf[closest].set & PUMP_NETINFO_HAS_GATEWAY) ! pumpSetupDefaultGateway(&intf[closest].gateway); ! ! setupDns(intf + closest, o); ! setupDomain(intf + closest, o); ! ! callScript(o->script, PUMP_SCRIPT_NEWLEASE, ! &intf[closest]); } } *************** *** 461,467 **** cmd.u.result = 0; numInterfaces++; } - callScript(o->script, PUMP_SCRIPT_NEWLEASE, intf); break; --- 474,482 ---- cmd.u.result = 0; numInterfaces++; + + /* Only call on sucess! 2001-03-29 JSP */ + callScript(o->script, PUMP_SCRIPT_NEWLEASE, intf); } break;
Sorry for the long reply delay... Does this bug still exist in the pump from rawhide? Also, I hate to be picky, but please resend the patch in unified (diff -u) format so I can read and merge it more easily. Thanks.