svn commit: r191014 - stable/7/usr.sbin/ppp

Bjoern A. Zeeb bz at FreeBSD.org
Mon Apr 13 20:19:30 UTC 2009


Author: bz
Date: Mon Apr 13 20:19:28 2009
New Revision: 191014
URL: http://svn.freebsd.org/changeset/base/191014

Log:
  MFC r186308 by qingli:
  
    The ppp application relies on the if_tun interface to properly
    install a ptp host route between the end points. The ppp module
    upates this router based on user configuration later on. The
    rt_Update() seems to always set the RTF_GATEWAY flag, which is
    broken.
  
  PR:		bin/130159
  Approved by:	re (kensmith)

Modified:
  stable/7/usr.sbin/ppp/   (props changed)
  stable/7/usr.sbin/ppp/route.c

Modified: stable/7/usr.sbin/ppp/route.c
==============================================================================
--- stable/7/usr.sbin/ppp/route.c	Mon Apr 13 19:54:33 2009	(r191013)
+++ stable/7/usr.sbin/ppp/route.c	Mon Apr 13 20:19:28 2009	(r191014)
@@ -902,8 +902,10 @@ rt_Update(struct bundle *bundle, const s
     p += memcpy_roundup(p, dst, dst->sa_len);
   }
 
-  rtmes.m_rtm.rtm_addrs |= RTA_GATEWAY;
+  if (gw != NULL && (gw->sa_family != AF_LINK))
+    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);


More information about the svn-src-all mailing list