Skip to content

Commit

Permalink
do not setup ipip tunneling when --enable-overlay is false (#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
aauren authored and murali-reddy committed May 12, 2019
1 parent 7181d6f commit 8bb50d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/controllers/routing/network_routes_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,8 @@ func (nrc *NetworkRoutingController) injectRoute(path *table.Path) error {

// create IPIP tunnels only when node is not in same subnet or overlay-type is set to 'full'
// prevent creation when --override-nexthop=true as well
if (!sameSubnet || nrc.overlayType == "full") && !nrc.overrideNextHop {
// if the user has disabled overlays, don't create tunnels
if (!sameSubnet || nrc.overlayType == "full") && !nrc.overrideNextHop && nrc.enableOverlays {
// create ip-in-ip tunnel and inject route as overlay is enabled
var link netlink.Link
var err error
Expand Down Expand Up @@ -488,7 +489,7 @@ func (nrc *NetworkRoutingController) injectRoute(path *table.Path) error {
Dst: dst,
Protocol: 0x11,
}
} else {
} else if sameSubnet {
route = &netlink.Route{
Dst: dst,
Gw: nexthop,
Expand Down

0 comments on commit 8bb50d5

Please sign in to comment.