Bug 3725

Summary: Failure when DHCP server returns more than three DNS servers
Product: [Retired] Red Hat Linux Reporter: jdawson
Component: pumpAssignee: Erik Troan <ewt>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: jdawson
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-08-19 22:11:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jdawson 1999-06-25 14:30:26 UTC
When the DHCP server returns more than three DNS servers,
all hell breaks loose.  On my system, /etc/resolv.conf gets
the first three DNS servers listed correctly, and then about
a thousand more that have random junk for their IP
addresses.


------- Email Received From  John Dawson <jdawson> 06/25/99 10:42 -------

Comment 1 jdawson 1999-06-25 14:46:59 UTC
The patch I submitted fixes it.  I note that my email with the
attachment didn't show up here, so just for good measure, I'll paste
the patch here too.

Binary files pump-0.6.7.orig/pump and pump-0.6.7/pump differ
diff -uNr pump-0.6.7.orig/pump.c pump-0.6.7/pump.c
--- pump-0.6.7.orig/pump.c      Sat May  8 10:27:32 1999
+++ pump-0.6.7/pump.c   Fri Jun 25 09:11:50 1999
@@ -446,7 +446,7 @@
        switch (option) {
            case BOOTP_OPTION_DNS:
                intf->numDns = 0;
-               for (i = 0; i < length; i += 4)
+               for (i = 0; i < length && i < sizeof intf->dnsServers;
i += 4)
                    memcpy(&intf->dnsServers[intf->numDns++], chptr +
i, 4);
                intf->set |= NETINFO_HAS_DNS;
                break;
Binary files pump-0.6.7.orig/pump.o and pump-0.6.7/pump.o differ

Comment 2 Jeff Johnson 1999-06-26 14:19:59 UTC
I believe that Erik fixed the problem by discarding all nameservers
after the first 3. The resolver code in linux has never used more than
the first 3 name servers. Or so I'm told ...

Comment 3 Bill Nottingham 1999-08-19 22:11:59 UTC
Should be fixed in the errata release.