aboutsummaryrefslogtreecommitdiffstats
path: root/COPYING
diff options
context:
space:
mode:
authorChris Novakovic <chris@chrisn.me.uk>2018-04-24 03:56:37 +0100
committerDavid S. Miller <davem@davemloft.net>2018-04-24 13:40:41 -0400
commit300eec7c0a2495f771709c7642aa15f7cc148b83 (patch)
tree92f29284c8b28bea58ea34e38a778e71015d27d1 /COPYING
parentipconfig: Document /proc/net/pnp (diff)
downloadlinux-dev-300eec7c0a2495f771709c7642aa15f7cc148b83.tar.xz
linux-dev-300eec7c0a2495f771709c7642aa15f7cc148b83.zip
ipconfig: Correctly initialise ic_nameservers
ic_nameservers, which stores the list of name servers discovered by ipconfig, is initialised (i.e. has all of its elements set to NONE, or 0xffffffff) by ic_nameservers_predef() in the following scenarios: - before the "ip=" and "nfsaddrs=" kernel command line parameters are parsed (in ip_auto_config_setup()); - before autoconfiguring via DHCP or BOOTP (in ic_bootp_init()), in order to clear any values that may have been set after parsing "ip=" or "nfsaddrs=" and are no longer needed. This means that ic_nameservers_predef() is not called when neither "ip=" nor "nfsaddrs=" is specified on the kernel command line. In this scenario, every element in ic_nameservers remains set to 0x00000000, which is indistinguishable from ANY and causes pnp_seq_show() to write the following (bogus) information to /proc/net/pnp: #MANUAL nameserver 0.0.0.0 nameserver 0.0.0.0 nameserver 0.0.0.0 This is potentially problematic for systems that blindly link /etc/resolv.conf to /proc/net/pnp. Ensure that ic_nameservers is also initialised when neither "ip=" nor "nfsaddrs=" are specified by calling ic_nameservers_predef() in ip_auto_config(), but only when ip_auto_config_setup() was not called earlier. This causes the following to be written to /proc/net/pnp, and is consistent with what gets written when ipconfig is configured manually but no name servers are specified on the kernel command line: #MANUAL Signed-off-by: Chris Novakovic <chris@chrisn.me.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions