From 25ac719fe6d81622fdf3bae3a20420d363d69a45 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Sat, 21 Aug 2021 18:22:24 +0000 Subject: [PATCH] Match bridge MTU when creating veth pair This bug resulted in mtu mismatch between the bridge and veth pair when a custom MTU was provided. --- network/create.go | 1 + 1 file changed, 1 insertion(+) diff --git a/network/create.go b/network/create.go index 76dc69d..1860c08 100644 --- a/network/create.go +++ b/network/create.go @@ -184,6 +184,7 @@ func (c *Client) vethPair(pid int, bridgeName string) (*netlink.Veth, error) { la := netlink.NewLinkAttrs() la.Name = fmt.Sprintf("%s-%d", c.opt.PortPrefix, pid) + la.MTU = br.Attrs().MTU la.MasterIndex = br.Attrs().Index return &netlink.Veth{