Exemple #1
0
func enableDoLinkLocal() {
	err := rancherNetwork.ApplyNetworkConfigs(&rancherConfig.NetworkConfig{
		Interfaces: map[string]rancherConfig.InterfaceConfig{
			"eth0": {
				IPV4LL: true,
			},
		},
	})
	if err != nil {
		log.Errorf("Failed to apply link local on eth0: %v", err)
	}
}
Exemple #2
0
func setupSystemBridge(cfg *config.Config) error {
	bridge, cidr := cfg.SystemDocker.BridgeConfig()
	if bridge == "" {
		return nil
	}

	return network.ApplyNetworkConfigs(&config.NetworkConfig{
		Interfaces: map[string]config.InterfaceConfig{
			bridge: {
				Bridge:  true,
				Address: cidr,
			},
		},
	})
}