1
0
mirror of https://github.com/rancher/os.git synced 2025-09-19 09:22:40 +00:00

Bump netconf

This commit is contained in:
Josh Curl
2016-05-07 13:41:57 -07:00
parent a9ca80d47d
commit 0e82ddadfc
3 changed files with 7 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ import:
version: v1.10.3 version: v1.10.3
- package: github.com/rancher/netconf - package: github.com/rancher/netconf
version: 7880fdeac0923a05b86a0b5774b4dc96a5749d76 version: 43bd602971bfed4d41cdcc1ef9cffa204ad28c3f
- package: github.com/ryanuber/go-glob - package: github.com/ryanuber/go-glob
version: 0067a9abd927e50aed5190662702f81231413ae0 version: 0067a9abd927e50aed5190662702f81231413ae0

View File

@@ -183,6 +183,8 @@ func ApplyNetworkConfigs(netCfg *NetworkConfig) error {
} }
func RunDhcp(netCfg *NetworkConfig, setHostname, setDns bool) error { func RunDhcp(netCfg *NetworkConfig, setHostname, setDns bool) error {
populateDefault(netCfg)
links, err := netlink.LinkList() links, err := netlink.LinkList()
if err != nil { if err != nil {
return err return err
@@ -360,7 +362,7 @@ func applyInterfaceConfig(link netlink.Link, netConf InterfaceConfig) error {
} }
if err := setGateway(netConf.GatewayIpv6); err != nil { 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) runCmds(netConf.PostUp, link.Attrs().Name)

View File

@@ -5,6 +5,9 @@ type NetworkConfig struct {
Dns DnsConfig `yaml:"dns,omitempty"` Dns DnsConfig `yaml:"dns,omitempty"`
Interfaces map[string]InterfaceConfig `yaml:"interfaces,omitempty"` Interfaces map[string]InterfaceConfig `yaml:"interfaces,omitempty"`
PostCmds []string `yaml:"post_cmds,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 { type InterfaceConfig struct {