From 898d78d688644a607af018aa2c379545235fdb5a Mon Sep 17 00:00:00 2001 From: Murali Reddy Date: Mon, 7 Aug 2017 19:35:36 +0530 Subject: [PATCH] reduce ipip tunnel MTU 20 to accommodate the tunnel overhead Fixes #108 --- app/controllers/network_routes_controller.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/network_routes_controller.go b/app/controllers/network_routes_controller.go index b473ed3b84..bb92742e85 100644 --- a/app/controllers/network_routes_controller.go +++ b/app/controllers/network_routes_controller.go @@ -390,6 +390,10 @@ func (nrc *NetworkRoutingController) injectRoute(path *table.Path) error { if err := netlink.LinkSetUp(link); err != nil { return errors.New("Failed to bring tunnel interface " + tunnelName + " up due to: " + err.Error()) } + // reduce the MTU by 20 bytes to accommodate ipip tunnel overhead + if err := netlink.LinkSetMTU(link, link.Attrs().MTU-20); err != nil { + return errors.New("Failed to set MTU of tunnel interface " + tunnelName + " up due to: " + err.Error()) + } } else { glog.Infof("Tunnel interface: " + tunnelName + " for the node " + nexthop.String() + " already exists.") }