Skip to content

Commit

Permalink
ovn0 ipv6 addr gen mode set 0 (#3580)
Browse files Browse the repository at this point in the history
Signed-off-by: changluyi <[email protected]>
  • Loading branch information
changluyi authored Dec 27, 2023
1 parent f9b3aa4 commit b0df192
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/daemon/ovs_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,15 @@ func configureNodeNic(portName, ip, gw string, macAddr net.HardwareAddr, mtu int
return fmt.Errorf(raw)
}

value, err := sysctl.Sysctl(fmt.Sprintf("net.ipv6.conf.%s.addr_gen_mode", util.NodeNic))
if err == nil {
if value != "0" {
if _, err = sysctl.Sysctl(fmt.Sprintf("net.ipv6.conf.%s.addr_gen_mode", util.NodeNic), "0"); err != nil {
return fmt.Errorf("failed to set ovn0 addr_gen_mode: %v", err)
}
}
}

if err = configureNic(util.NodeNic, ip, macAddr, mtu, false); err != nil {
return err
}
Expand Down

0 comments on commit b0df192

Please sign in to comment.