From Bugzilla Helper: User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.9-21smp i686) Description of problem: If pump cannot renew a lease and tries to get a new one, it does not reset the gateway and dns server with information from the new lease. Consider the following scenario: You have a switch that blocks access until you have authenticated. pump asks for an IP address, and the switch hands out a private address (192.168.1.x) with a very short renewal time (3 secs). The user opens a web browser and the switch gives out a web page with a login and password box. The user types in a login and password, and the switch validates them, unblocks the port and stops replying to the dhcp lease renewals. pump notices that the lease renewals are being ignored, and logs that fact. It now tries to get a new lease, and since the switch port is unblocked, the dhcp requests go to the real server which responds with correct information for the network the system is on. This includes the real gateway and dns server information. Pump doesn't call the routines to set the default gateway or update /etc/resolv.conf in this case, but does update the interface's IP address to the correct value. This leaves the system in a state where it can't talk to other systems. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. see above 2. 3. Actual Results: The gateway and dns servers are not updated correctly. Expected Results: The gateway and dns servers should be updated as per the lease info. Additional info: This patch fixes the problem. --- pump.c.dist Wed Feb 28 23:15:22 2001 +++ pump.c Wed Jul 31 09:36:00 2002 @@ -427,6 +427,13 @@ intf[i] = intf[numInterfaces - 1]; numInterfaces--; } else { + if ((intf[closest].set & PUMP_NETINFO_HAS_GATEWAY) && + !(o->flags & OVERRIDE_FLAG_NOGATEWAY)) + pumpSetupDefaultGateway(&intf[closest].gateway); + + setupDns(intf + closest, o); + setupDomain(intf + closest, o); + callScript(o->script, PUMP_SCRIPT_NEWLEASE, &intf[closest]); }
in cvs, not pkg