Bug 3725 - Failure when DHCP server returns more than three DNS servers
Failure when DHCP server returns more than three DNS servers
Status: CLOSED ERRATA
Product: Red Hat Linux
Classification: Retired
Component: pump (Show other bugs)
6.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Erik Troan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-06-25 10:30 EDT by jdawson
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-08-19 18:11:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description jdawson 1999-06-25 10:30:26 EDT
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@tkg.com> 06/25/99 10:42 -------
Comment 1 jdawson 1999-06-25 10:46:59 EDT
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 10:19:59 EDT
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 18:11:59 EDT
Should be fixed in the errata release.

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