Author: qingli
Date: Sun Sep 20 17:22:19 2009
New Revision: 197364
URL: http://svn.freebsd.org/changeset/base/197364

Log:
  A wrong variable is used when setting up the interface
  address route, which broke source address selection in
  some code paths.
  
  Submitted by: noted by bz
  Reviewed by:  hrs
  MFC after:    immediately

Modified:
  head/sys/net/if.c

Modified: head/sys/net/if.c
==============================================================================
--- head/sys/net/if.c   Sun Sep 20 16:47:56 2009        (r197363)
+++ head/sys/net/if.c   Sun Sep 20 17:22:19 2009        (r197364)
@@ -1432,9 +1432,9 @@ ifa_add_loopback_route(struct ifaddr *if
        if (error == 0 && rt != NULL) {
                RT_LOCK(rt);
                ((struct sockaddr_dl *)rt->rt_gateway)->sdl_type  =
-                       rt->rt_ifp->if_type;
+                       ifa->ifa_ifp->if_type;
                ((struct sockaddr_dl *)rt->rt_gateway)->sdl_index =
-                       rt->rt_ifp->if_index;
+                       ifa->ifa_ifp->if_index;
                RT_REMREF(rt);
                RT_UNLOCK(rt);
        } else if (error != 0)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to