Author: bz
Date: Wed Apr 22 08:37:02 2009
New Revision: 191373
URL: http://svn.freebsd.org/changeset/base/191373

Log:
  MFC r191305:
  
   Back out r186308 (r191014 in stable/7):
  
   In case of AF_LINK, which the kernel still returns for an RTAX_GATEWAY
   as an empty sockaddr_dl in the classic tun<n> case:
   copying the address into the message payload, but not the RTA_GATEWAY
   flag results in rt_xaddrs() in the kernel tripping over that and parsing
   the next attribute set with a flag, i.e. RTA_NETMASK, with the gateway
   address, resulting in bogus route entry.
  
  Approved by:  re (kensmith)

Modified:
  releng/7.2/usr.sbin/ppp/   (props changed)
  releng/7.2/usr.sbin/ppp/route.c

Modified: releng/7.2/usr.sbin/ppp/route.c
==============================================================================
--- releng/7.2/usr.sbin/ppp/route.c     Wed Apr 22 08:22:16 2009        
(r191372)
+++ releng/7.2/usr.sbin/ppp/route.c     Wed Apr 22 08:37:02 2009        
(r191373)
@@ -902,10 +902,8 @@ rt_Update(struct bundle *bundle, const s
     p += memcpy_roundup(p, dst, dst->sa_len);
   }
 
-  if (gw != NULL && (gw->sa_family != AF_LINK))
-    rtmes.m_rtm.rtm_addrs |= RTA_GATEWAY;
+  rtmes.m_rtm.rtm_addrs |= RTA_GATEWAY;
   p += memcpy_roundup(p, gw, gw->sa_len);
-
   if (mask) {
     rtmes.m_rtm.rtm_addrs |= RTA_NETMASK;
     p += memcpy_roundup(p, mask, mask->sa_len);
_______________________________________________
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