1
0
mirror of https://github.com/rancher/os.git synced 2025-07-13 14:44:03 +00:00

Bump netconf

This commit is contained in:
Josh Curl 2016-06-07 11:14:06 -07:00
parent 7ec73416c8
commit 09b4b202b2
No known key found for this signature in database
GPG Key ID: 82B504B9BCCFA677
3 changed files with 8 additions and 3 deletions

View File

@ -34,7 +34,7 @@ github.com/opencontainers/specs f955d90e70a98ddfb886bd930ffd076da9b67998
github.com/packethost/packngo 92012705236896736875186c9e49557897c6af90 https://github.com/ibuildthecloud/packngo.git github.com/packethost/packngo 92012705236896736875186c9e49557897c6af90 https://github.com/ibuildthecloud/packngo.git
github.com/pmezard/go-difflib d8ed2627bdf02c080bf22230dbb337003b7aba2d github.com/pmezard/go-difflib d8ed2627bdf02c080bf22230dbb337003b7aba2d
github.com/rancher/docker-from-scratch v1.10.3 github.com/rancher/docker-from-scratch v1.10.3
github.com/rancher/netconf 7880fdeac0923a05b86a0b5774b4dc96a5749d76 github.com/rancher/netconf ddd7e35a6aacd7e80991920774083dd4408ec018
github.com/rcrowley/go-metrics eeba7bd0dd01ace6e690fa833b3f22aaec29af43 github.com/rcrowley/go-metrics eeba7bd0dd01ace6e690fa833b3f22aaec29af43
github.com/ryanuber/go-glob 0067a9abd927e50aed5190662702f81231413ae0 github.com/ryanuber/go-glob 0067a9abd927e50aed5190662702f81231413ae0
github.com/seccomp/libseccomp-golang 1b506fc7c24eec5a3693cdcbed40d9c226cfc6a1 github.com/seccomp/libseccomp-golang 1b506fc7c24eec5a3693cdcbed40d9c226cfc6a1

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
@ -315,7 +317,7 @@ func applyInterfaceConfig(link netlink.Link, netConf InterfaceConfig) error {
if err := b.AddLink(link); err != nil { if err := b.AddLink(link); err != nil {
return err return err
} }
return nil return linkUp(link, netConf)
} }
if netConf.IPV4LL { if netConf.IPV4LL {
@ -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 {