From b417696c66bb6b695ac0444b14341c3418916db0 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Thu, 26 May 2016 11:17:04 +0000 Subject: [PATCH] Wait 1ms before sending gratuitous arp --- net/veth.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/veth.go b/net/veth.go index 72dfd558..eea00485 100644 --- a/net/veth.go +++ b/net/veth.go @@ -3,6 +3,7 @@ package net import ( "fmt" "net" + "time" "github.com/j-keck/arping" "github.com/vishvananda/netlink" @@ -148,6 +149,8 @@ func AttachContainer(ns netns.NsHandle, id, ifName, bridgeName string, mtu int, return err } for _, ipnet := range newAddresses { + // If we don't wait for a bit here, we see the arp fail to reach the bridge. + time.Sleep(1 * time.Millisecond) arping.GratuitousArpOverIfaceByName(ipnet.IP, ifName) } if withMulticastRoute {