Currently, it's possible to specify the primary dns server via the dns= boot parameter. It'd be nice if this parameter would allow multiple servers. I will attach two small patches which enable this. The first patch makes setupNetworkDeviceConfig in net.c search the dns parameter for multiple comma-separated servers. This is completely backwards-compatible with the current behavior, but if additional servers are specified, they're used too. The second patch makes this information not get discarded when the network config newt gui is shown -- currently, only the primary server is displayed and the others are ignored. This leaves the GUI alone -- only the first shows up still -- but if additional servers were specified earlier, they're carried forwards.
Created attachment 90111 [details] scan dns parameter for multiple servers
Created attachment 90112 [details] don't discard info for additional servers
(I had a for loop in the first patch, but decided it looks cleaner and is easier to understand as a while loop. The code in the second patch may not be at precisely the best place to do what it does, but it seemed like the least-intrusive.)
Committed with a few minor changes
cool, thanks.
Hmmm. Additional servers now seem to get dropped again in FC2t3. This is definitely a regression, as it worked before. Should I open a new bug or reopen this one?
No comment, so I'll reopen. :)
Created attachment 99800 [details] fixes new problem where numDns gets zapped back to 1 Ahaha! This is what was doing it. An || here makes no sense -- it was overwriting the command-line DNS entries whenever the IP address was static.
Committed
thank you!
Doh; we're back again. The block of code that does this got moved around (presumably, based on a comment in the changelog, to fix bug #122554, but I don't have permissions to see that) again, and again cfg->dev.numDns is getting hard-set to 1 even if there's other entries. (This is in both the nahant beta 10.1.1.3 version and in the FC devel tree.) I'll attach a simple patch which I believe should fix this _and_ not break whatever #122554 is.
Created attachment 109157 [details] fixes the _new_ thing where secondary and tertiary dns entries get capriciously discarded :)
bug 122554 is basically that if you type the wrong IP for the dns server when doing a static IP and then go back it doesn't remember the change. Can you verify that that still works with your new patch?
Yeah, still works. I tested it, and I also have logical reason to believe that will still work... that's what I assumed bug 122554 was. The old (wrong) way did the check and only then set cfg->dev.dnsServers[0] = addr. The new patch doesn't do the check and just sets cfg->dev.dnsServers[0] = addr, but rather than setting cfg->dev.numDns to a hard-coded 1, it only sets it to 1 if it was previously less than 1. So it should be all good.
Yeah, the logic followed right, I just wanted a quick test to make sure I wasn't going crazy since I'm sure I'll forget to do so by the time I get it built. Committed to CVS, thanks.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2005-220.html