File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ type NetConf struct {
56
56
PromiscMode bool `json:"promiscMode"`
57
57
Vlan int `json:"vlan"`
58
58
MacSpoofChk bool `json:"macspoofchk,omitempty"`
59
+ EnableDad bool `json:"enabledad,omitempty"`
59
60
60
61
Args struct {
61
62
Cni BridgeArgs `json:"cni,omitempty"`
@@ -501,7 +502,11 @@ func cmdAdd(args *skel.CmdArgs) error {
501
502
502
503
// Configure the container hardware address and IP address(es)
503
504
if err := netns .Do (func (_ ns.NetNS ) error {
504
- _ , _ = sysctl .Sysctl (fmt .Sprintf ("net/ipv6/conf/%s/accept_dad" , args .IfName ), "0" )
505
+ if n .EnableDad {
506
+ _ , _ = sysctl .Sysctl (fmt .Sprintf ("net/ipv6/conf/%s/accept_dad" , args .IfName ), "1" )
507
+ } else {
508
+ _ , _ = sysctl .Sysctl (fmt .Sprintf ("net/ipv6/conf/%s/accept_dad" , args .IfName ), "0" )
509
+ }
505
510
_ , _ = sysctl .Sysctl (fmt .Sprintf ("net/ipv4/conf/%s/arp_notify" , args .IfName ), "1" )
506
511
507
512
// Add the IP to the interface
You can’t perform that action at this time.
0 commit comments