Skip to content

Commit dbb347e

Browse files
ameyagKendall Stratton
andauthored
Adding ExternalPortReserved flag to NatPolicy for HNS API V1. THis is a flag exposed for docker to avoid port reservation conflict with external port (#1370)
HNS API V2 will use NatFlags to check and see if ExternalPortReserved is set (cherry picked from commit b85f3fd) Signed-off-by: Ameya Gawde <[email protected]> Co-authored-by: Kendall Stratton <[email protected]>
1 parent 113a929 commit dbb347e

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

internal/hns/hnspolicy.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ const (
2121
)
2222

2323
type NatPolicy struct {
24-
Type PolicyType `json:"Type"`
25-
Protocol string `json:",omitempty"`
26-
InternalPort uint16 `json:",omitempty"`
27-
ExternalPort uint16 `json:",omitempty"`
24+
Type PolicyType `json:"Type"`
25+
Protocol string `json:",omitempty"`
26+
InternalPort uint16 `json:",omitempty"`
27+
ExternalPort uint16 `json:",omitempty"`
28+
ExternalPortReserved bool `json:",omitempty"`
2829
}
2930

3031
type QosPolicy struct {

test/vendor/github.com/Microsoft/hcsshim/internal/hns/hnspolicy.go

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)