Skip to content

Commit

Permalink
fix: ipv6 network format when update subnet
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Oct 16, 2020
1 parent 7f3b834 commit bb130ca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/ovs/ovn-nbctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ func (c Client) SetLogicalSwitchConfig(ls, protocol, subnet, gateway string, exc
"set", "logical_switch", ls, fmt.Sprintf("other_config:exclude_ips=%s", strings.Join(excludeIps, " ")), "--",
"set", "logical_router_port", fmt.Sprintf("%s-%s", c.ClusterRouter, ls), fmt.Sprintf("networks=%s/%s", gateway, mask))
case kubeovnv1.ProtocolIPv6:
gateway := strings.ReplaceAll(gateway, ":", "\\:")
_, err = c.ovnNbCommand(MayExist, "ls-add", ls, "--",
"set", "logical_switch", ls, fmt.Sprintf("other_config:ipv6_prefix=%s", strings.Split(subnet, "/")[0]), "--",
"set", "logical_switch", ls, fmt.Sprintf("other_config:gateway=%s", gateway), "--",
Expand Down

0 comments on commit bb130ca

Please sign in to comment.