From owner-svn-src-all@FreeBSD.ORG Fri Dec 19 01:37:21 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C1EB1065674; Fri, 19 Dec 2008 01:37:21 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F157A8FC18; Fri, 19 Dec 2008 01:37:20 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBJ1bKqu057756; Fri, 19 Dec 2008 01:37:20 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBJ1bKlg057755; Fri, 19 Dec 2008 01:37:20 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200812190137.mBJ1bKlg057755@svn.freebsd.org> From: Qing Li Date: Fri, 19 Dec 2008 01:37:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186308 - head/usr.sbin/ppp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2008 01:37:21 -0000 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);