Skip to content

Commit

Permalink
Merge pull request projectcalico#1017 from song-jiang/song-host-route
Browse files Browse the repository at this point in the history
Added encap route policy for l2bridge
  • Loading branch information
song-jiang authored Feb 10, 2021
2 parents 8dfa7d0 + 33eb5bc commit 03c3dfc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/dataplane/windows/dataplane_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,20 @@ func (d *windowsDataplane) createAndAttachContainerEP(args *skel.CmdArgs,
[]byte(fmt.Sprintf(`{"Type":"PA","PA":"%s"}`, hnsNetwork.ManagementIP)),
}...)

} else {
// Add an entry to force encap to the management IP. We think this is required for node ports. The encap is
// local to the host so there's no real vxlan going on here.
dict := map[string]interface{}{
"Type": "ROUTE",
"DestinationPrefix": mgmtIP.String() + "/32",
"NeedEncap": true,
}
encoded, err := json.Marshal(dict)
if err != nil {
return nil, fmt.Errorf("failed to add route encap policy")
}

pols = append(pols, json.RawMessage(encoded))
}

attempts := 3
Expand Down

0 comments on commit 03c3dfc

Please sign in to comment.