1
0
mirror of https://github.com/rancher/os.git synced 2025-08-01 06:59:05 +00:00

Fetch dns nameservers from wifi dhcp networks

This commit is contained in:
Jason-ZW 2018-11-15 19:19:24 +08:00 committed by niusmallnan
parent 7b23decffd
commit 200cf7111a

View File

@ -329,7 +329,7 @@ func runWifiDhcp(netCfg *NetworkConfig, link netlink.Link, network string, setHo
// Remove DHCP lease IP and static IP
if hasDhcp(iface) {
runDhcp(netCfg, iface, dhcpReleaseCmd, false, false)
runDhcp(netCfg, iface, dhcpReleaseCmd, false, true)
}
existAddress, _ := getLinkAddrs(link)
for _, addr := range existAddress {
@ -337,7 +337,7 @@ func runWifiDhcp(netCfg *NetworkConfig, link netlink.Link, network string, setHo
removeAddress(addr, link)
}
runDhcp(netCfg, iface, "", !setHostname, !setDNS)
runDhcp(netCfg, iface, "", !setHostname, setDNS)
}
func linkUp(link netlink.Link, netConf InterfaceConfig) error {