Phonet: Netlink event for autoconfigured addresses
authorRémi Denis-Courmont <remi.denis-courmont@nokia.com>
Mon, 14 Sep 2009 03:10:27 +0000 (03:10 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Sep 2009 00:03:27 +0000 (17:03 -0700)
From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/phonet/pn_dev.c

index 2f65dcaed2fb072056ee2b3a11a89fa7033dc903..5f42f30dd1682bdc2427e7b387390fe231ab305e 100644 (file)
@@ -209,7 +209,14 @@ static int phonet_device_autoconf(struct net_device *dev)
                                                SIOCPNGAUTOCONF);
        if (ret < 0)
                return ret;
-       return phonet_address_add(dev, req.ifr_phonet_autoconf.device);
+
+       ASSERT_RTNL();
+       ret = phonet_address_add(dev, req.ifr_phonet_autoconf.device);
+       if (ret)
+               return ret;
+       phonet_address_notify(RTM_NEWADDR, dev,
+                               req.ifr_phonet_autoconf.device);
+       return 0;
 }
 
 /* notify Phonet of device events */