Skip to content

Commit 898d78d

Browse files
author
Murali Reddy
committed
reduce ipip tunnel MTU 20 to accommodate the tunnel overhead
Fixes #108
1 parent fcac507 commit 898d78d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/controllers/network_routes_controller.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,10 @@ func (nrc *NetworkRoutingController) injectRoute(path *table.Path) error {
390390
if err := netlink.LinkSetUp(link); err != nil {
391391
return errors.New("Failed to bring tunnel interface " + tunnelName + " up due to: " + err.Error())
392392
}
393+
// reduce the MTU by 20 bytes to accommodate ipip tunnel overhead
394+
if err := netlink.LinkSetMTU(link, link.Attrs().MTU-20); err != nil {
395+
return errors.New("Failed to set MTU of tunnel interface " + tunnelName + " up due to: " + err.Error())
396+
}
393397
} else {
394398
glog.Infof("Tunnel interface: " + tunnelName + " for the node " + nexthop.String() + " already exists.")
395399
}

0 commit comments

Comments
 (0)