Date: Mon, 13 Apr 2009 20:19:28 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r191014 - stable/7/usr.sbin/ppp Message-ID: <200904132019.n3DKJS5G082383@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904132019.n3DKJS5G082383>