summaryrefslogtreecommitdiffhomepage
path: root/netboot
diff options
context:
space:
mode:
authorAndrea Barberio <insomniac@slackware.it>2018-11-19 22:42:11 +0000
committerinsomniac <insomniacslk@users.noreply.github.com>2018-11-20 17:33:36 +0000
commit0f072cd86cc36cf9bf7adac6b5f483f20e183162 (patch)
treeb4ba0924ce66fdb7d3010ba07fc17ae71f94a925 /netboot
parentdc5e468a3d26dafd71e6c16ee5a839a1da9a6afb (diff)
netboot: delay in IfUp to avoid hammering the CPU
Diffstat (limited to 'netboot')
-rw-r--r--netboot/netconf.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/netboot/netconf.go b/netboot/netconf.go
index 3cc5232..ec6a5e1 100644
--- a/netboot/netconf.go
+++ b/netboot/netconf.go
@@ -177,6 +177,7 @@ func IfUp(ifname string, timeout time.Duration) (netlink.Link, error) {
if err := netlink.LinkSetUp(iface); err != nil {
return nil, fmt.Errorf("interface %q: %v can't make it up: %v", ifname, iface, err)
}
+ time.Sleep(10 * time.Millisecond)
}
return nil, fmt.Errorf("timed out while waiting for %s to come up", ifname)