mirror of
https://github.com/cloudnativelabs/kube-router.git
synced 2025-10-10 09:21:04 +02:00
do not setup ipip tunneling when --enable-overlay is false (#722)
This commit is contained in:
parent
7181d6fa96
commit
8bb50d5a8c
@ -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'
|
// 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
|
// 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
|
// create ip-in-ip tunnel and inject route as overlay is enabled
|
||||||
var link netlink.Link
|
var link netlink.Link
|
||||||
var err error
|
var err error
|
||||||
@ -488,7 +489,7 @@ func (nrc *NetworkRoutingController) injectRoute(path *table.Path) error {
|
|||||||
Dst: dst,
|
Dst: dst,
|
||||||
Protocol: 0x11,
|
Protocol: 0x11,
|
||||||
}
|
}
|
||||||
} else {
|
} else if sameSubnet {
|
||||||
route = &netlink.Route{
|
route = &netlink.Route{
|
||||||
Dst: dst,
|
Dst: dst,
|
||||||
Gw: nexthop,
|
Gw: nexthop,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user