Skip to content

Commit

Permalink
Fix Windows AddNodePort parameter error
Browse files Browse the repository at this point in the history
VirtualServiceIPv4 is the wrong parameter for AddNodePort.
It should be replaced by VirtualNodePortDNATIPv4 to match the
correct IP destination.

Signed-off-by: Shuyang Xin <[email protected]>
  • Loading branch information
XinShuYang committed Aug 17, 2022
1 parent 173ef52 commit bebebc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/agent/route/route_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ func (c *Client) DeleteSNATRule(mark uint32) error {

// TODO: nodePortAddresses is not supported currently.
func (c *Client) AddNodePort(nodePortAddresses []net.IP, port uint16, protocol binding.Protocol) error {
return util.ReplaceNetNatStaticMapping(antreaNatNodePort, "0.0.0.0", port, config.VirtualServiceIPv4.String(), port, string(protocol))
return util.ReplaceNetNatStaticMapping(antreaNatNodePort, "0.0.0.0", port, config.VirtualNodePortDNATIPv4.String(), port, string(protocol))
}

func (c *Client) DeleteNodePort(nodePortAddresses []net.IP, port uint16, protocol binding.Protocol) error {
Expand Down

0 comments on commit bebebc5

Please sign in to comment.