From: Felix Fietkau Date: Wed, 28 Mar 2012 17:28:24 +0000 (+0300) Subject: netifd: fix hotplug-adding of non-bridge interfaces by setting the l3 device early X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f196d048107c1c28bf6ddda31f0927a5893e5f3d;p=oweals%2Fnetifd.git netifd: fix hotplug-adding of non-bridge interfaces by setting the l3 device early --- diff --git a/interface.c b/interface.c index c5addea..d749896 100644 --- a/interface.c +++ b/interface.c @@ -420,10 +420,10 @@ interface_set_main_dev(struct interface *iface, struct device *dev) if (iface->main_dev.dev == dev) return; - device_add_user(&iface->main_dev, dev); if (set_l3) interface_set_l3_dev(iface, dev); + device_add_user(&iface->main_dev, dev); if (claimed) device_claim(&iface->l3_dev);