1
0
mirror of https://github.com/rancher/os.git synced 2025-08-10 11:03:16 +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 // Remove DHCP lease IP and static IP
if hasDhcp(iface) { if hasDhcp(iface) {
runDhcp(netCfg, iface, dhcpReleaseCmd, false, false) runDhcp(netCfg, iface, dhcpReleaseCmd, false, true)
} }
existAddress, _ := getLinkAddrs(link) existAddress, _ := getLinkAddrs(link)
for _, addr := range existAddress { for _, addr := range existAddress {
@ -337,7 +337,7 @@ func runWifiDhcp(netCfg *NetworkConfig, link netlink.Link, network string, setHo
removeAddress(addr, link) removeAddress(addr, link)
} }
runDhcp(netCfg, iface, "", !setHostname, !setDNS) runDhcp(netCfg, iface, "", !setHostname, setDNS)
} }
func linkUp(link netlink.Link, netConf InterfaceConfig) error { func linkUp(link netlink.Link, netConf InterfaceConfig) error {