Skip to content

Commit

Permalink
fix: Update spec structs to account new fields
Browse files Browse the repository at this point in the history
  • Loading branch information
heyvito committed May 18, 2023
1 parent e43b784 commit 5f93deb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/hostagent/port.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (pf *portForwarder) forwardingAddresses(guest api.IPPort) (hostAddr string,
continue
}

mustAdjustHostIP = true
mustAdjustHostIP = rule.HostIPWasUndefined

// Rule lack's HostIP, and guest is binding to '0.0.0.0' or '::'. Bind to the same address family.
case rule.HostIPWasUndefined && guest.IP.IsUnspecified():
Expand Down
14 changes: 8 additions & 6 deletions pkg/limayaml/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,14 @@ func TestFillDefault(t *testing.T) {
}

defaultPortForward := PortForward{
GuestIP: api.IPv4loopback1,
GuestPortRange: [2]int{1, 65535},
HostIP: api.IPv4loopback1,
HostPortRange: [2]int{1, 65535},
Proto: TCP,
Reverse: false,
GuestIP: api.IPv4loopback1,
GuestPortRange: [2]int{1, 65535},
HostIP: api.IPv4loopback1,
HostPortRange: [2]int{1, 65535},
Proto: TCP,
Reverse: false,
HostIPWasUndefined: true,
GuestIPWasUndefined: true,
}

// ------------------------------------------------------------------------------------
Expand Down

0 comments on commit 5f93deb

Please sign in to comment.