From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 11:51:35 2009 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 749CF1065689; Mon, 20 Apr 2009 11:51:35 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 63E148FC0A; Mon, 20 Apr 2009 11:51:35 +0000 (UTC) (envelope-from bz@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 n3KBpZ4H045341; Mon, 20 Apr 2009 11:51:35 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3KBpZT7045340; Mon, 20 Apr 2009 11:51:35 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200904201151.n3KBpZT7045340@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 20 Apr 2009 11:51:35 +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: r191306 - 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: Mon, 20 Apr 2009 11:51:36 -0000 Author: bz Date: Mon Apr 20 11:51:35 2009 New Revision: 191306 URL: http://svn.freebsd.org/changeset/base/191306 Log: While we currently still seem to have a gateway address, for future stability, check for gw to be set before adding the flag and the address to the routing message. r186308, backed out in r191305, already tried to do that, and in addition ignore AF_LINK types of gateway addresses to work around a problem that r167797 had introduced on the kernel side always setting RTF_GATEWAY if a gateway address was passed into the kernel. The proper solution for this is still under discussion so I am hesitant to re-add the special AF_LINK treatment for now. MFC after: 3 days Modified: head/usr.sbin/ppp/route.c Modified: head/usr.sbin/ppp/route.c ============================================================================== --- head/usr.sbin/ppp/route.c Mon Apr 20 11:22:51 2009 (r191305) +++ head/usr.sbin/ppp/route.c Mon Apr 20 11:51:35 2009 (r191306) @@ -910,8 +910,11 @@ rt_Update(struct bundle *bundle, const s p += memcpy_roundup(p, dst, dst->sa_len); } - rtmes.m_rtm.rtm_addrs |= RTA_GATEWAY; - p += memcpy_roundup(p, gw, gw->sa_len); + if (gw) { + 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);