svn commit: r186308 - head/usr.sbin/ppp
Qing Li
qingli at FreeBSD.org
Fri Dec 19 01:37:21 UTC 2008
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);
More information about the svn-src-all
mailing list