Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Dec 2008 01:37:20 +0000 (UTC)
From:      Qing Li <qingli@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r186308 - head/usr.sbin/ppp
Message-ID:  <200812190137.mBJ1bKlg057755@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: qingli
Date: Fri Dec 19 01:37:20 2008
New Revision: 186308
URL: http://svn.freebsd.org/changeset/base/186308

Log:
  The ppp application relies on the if_tun interface to properly
  install a p2p 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.

Modified:
  head/usr.sbin/ppp/route.c

Modified: head/usr.sbin/ppp/route.c
==============================================================================
--- head/usr.sbin/ppp/route.c	Fri Dec 19 00:56:47 2008	(r186307)
+++ head/usr.sbin/ppp/route.c	Fri Dec 19 01:37:20 2008	(r186308)
@@ -910,8 +910,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812190137.mBJ1bKlg057755>