1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 14:48:55 +00:00

Bump netconf

This commit is contained in:
Josh Curl
2016-06-07 11:14:06 -07:00
parent 7ec73416c8
commit 09b4b202b2
3 changed files with 8 additions and 3 deletions

View File

@@ -183,6 +183,8 @@ func ApplyNetworkConfigs(netCfg *NetworkConfig) error {
}
func RunDhcp(netCfg *NetworkConfig, setHostname, setDns bool) error {
populateDefault(netCfg)
links, err := netlink.LinkList()
if err != nil {
return err
@@ -315,7 +317,7 @@ func applyInterfaceConfig(link netlink.Link, netConf InterfaceConfig) error {
if err := b.AddLink(link); err != nil {
return err
}
return nil
return linkUp(link, netConf)
}
if netConf.IPV4LL {
@@ -360,7 +362,7 @@ func applyInterfaceConfig(link netlink.Link, netConf InterfaceConfig) error {
}
if err := setGateway(netConf.GatewayIpv6); err != nil {
log.Errorf("Fail to set gateway %s", netConf.Gateway)
log.Errorf("Fail to set gateway %s", netConf.GatewayIpv6)
}
runCmds(netConf.PostUp, link.Attrs().Name)

View File

@@ -5,6 +5,9 @@ type NetworkConfig struct {
Dns DnsConfig `yaml:"dns,omitempty"`
Interfaces map[string]InterfaceConfig `yaml:"interfaces,omitempty"`
PostCmds []string `yaml:"post_cmds,omitempty"`
HttpProxy string `yaml:"http_proxy,omitempty"`
HttpsProxy string `yaml:"https_proxy,omitempty"`
NoProxy string `yaml:"no_proxy,omitempty"`
}
type InterfaceConfig struct {