From edc9f99bb63066bab12367ca23dbb6a46ca89803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Date: Thu, 21 May 2015 10:28:33 +0000 Subject: [PATCH] MFC: r282908 netfront: wait for backend to connect before sending ARP Sponsored by: Citrix Systems R&D --- sys/dev/xen/netfront/netfront.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c index 3c7636f20acf..26378cf0bb4c 100644 --- a/sys/dev/xen/netfront/netfront.c +++ b/sys/dev/xen/netfront/netfront.c @@ -683,7 +683,6 @@ netfront_backend_changed(device_t dev, XenbusState newstate) switch (newstate) { case XenbusStateInitialising: case XenbusStateInitialised: - case XenbusStateConnected: case XenbusStateUnknown: case XenbusStateClosed: case XenbusStateReconfigured: @@ -695,13 +694,15 @@ netfront_backend_changed(device_t dev, XenbusState newstate) if (network_connect(sc) != 0) break; xenbus_set_state(dev, XenbusStateConnected); -#ifdef INET - netfront_send_fake_arp(dev, sc); -#endif break; case XenbusStateClosing: xenbus_set_state(dev, XenbusStateClosed); break; + case XenbusStateConnected: +#ifdef INET + netfront_send_fake_arp(dev, sc); +#endif + break; } }