Skip to content

Commit 00406f9

Browse files
authored
Merge branch 'main' into fix/ndisc_ipvlan
2 parents 1079e11 + e82848a commit 00406f9

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

plugins/main/bridge/bridge.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ func calcGateways(result *current.Result, n *NetConf) (*gwInfo, *gwInfo, error)
240240

241241
// Add a default route for this family using the current
242242
// gateway address if necessary.
243-
if n.IsDefaultGW && !gws.defaultRouteFound {
243+
if n.IsDefaultGW {
244244
for _, route := range result.Routes {
245245
if route.GW != nil && defaultNet.String() == route.Dst.String() {
246246
gws.defaultRouteFound = true
@@ -629,14 +629,10 @@ func cmdAdd(args *skel.CmdArgs) error {
629629
}
630630

631631
if n.IsGW {
632-
var firstV4Addr net.IP
633632
var vlanInterface *current.Interface
634633
// Set the IP address(es) on the bridge and enable forwarding
635634
for _, gws := range []*gwInfo{gwsV4, gwsV6} {
636635
for _, gw := range gws.gws {
637-
if gw.IP.To4() != nil && firstV4Addr == nil {
638-
firstV4Addr = gw.IP
639-
}
640636
if n.Vlan != 0 {
641637
vlanIface, err := ensureVlanInterface(br, n.Vlan, n.PreserveDefaultVlan)
642638
if err != nil {
@@ -733,7 +729,7 @@ func cmdAdd(args *skel.CmdArgs) error {
733729
}
734730

735731
// Use incoming DNS settings if provided, otherwise use the
736-
// settings that were already configued by the IPAM plugin
732+
// settings that were already configured by the IPAM plugin
737733
if dnsConfSet(n.DNS) {
738734
result.DNS = n.DNS
739735
}

plugins/main/macvlan/macvlan.go

+1
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ func cmdAdd(args *skel.CmdArgs) error {
351351

352352
err = netns.Do(func(_ ns.NetNS) error {
353353
_, _ = sysctl.Sysctl(fmt.Sprintf("net/ipv4/conf/%s/arp_notify", args.IfName), "1")
354+
_, _ = sysctl.Sysctl(fmt.Sprintf("net/ipv6/conf/%s/ndisc_notify", args.IfName), "1")
354355

355356
return ipam.ConfigureIface(args.IfName, result)
356357
})

0 commit comments

Comments
 (0)