ospfd doesn't pick up an lo(4) added while it's running unless you
manually ifconfig down+up.

this does the same dance as if_gif.c to ensure RTM_IFINFO gets sent.

ok?


Index: if_loop.c
===================================================================
RCS file: /cvs/src/sys/net/if_loop.c,v
retrieving revision 1.44
diff -u -p -r1.44 if_loop.c
--- if_loop.c   7 May 2008 12:58:54 -0000       1.44
+++ if_loop.c   4 Jul 2011 08:36:50 -0000
@@ -423,12 +423,16 @@ loioctl(ifp, cmd, data)
 {
        struct ifaddr *ifa;
        struct ifreq *ifr;
-       int error = 0;
+       int s, error = 0;
 
        switch (cmd) {
 
        case SIOCSIFADDR:
-               ifp->if_flags |= IFF_UP | IFF_RUNNING;
+               s = splnet();
+               ifp->if_flags |= IFF_RUNNING;
+               if_up(ifp);             /* send up RTM_IFINFO */
+               splx(s);
+
                ifa = (struct ifaddr *)data;
                if (ifa != 0)
                        ifa->ifa_rtrequest = lortrequest;

Reply via email to