From owner-svn-src-stable@FreeBSD.ORG Wed Feb 15 05:35:37 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4EC71065672; Wed, 15 Feb 2012 05:35:37 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FE938FC0A; Wed, 15 Feb 2012 05:35:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1F5Zb9n039141; Wed, 15 Feb 2012 05:35:37 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1F5ZbZs039139; Wed, 15 Feb 2012 05:35:37 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201202150535.q1F5ZbZs039139@svn.freebsd.org> From: Kevin Lo Date: Wed, 15 Feb 2012 05:35:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231740 - stable/8/sys/net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2012 05:35:37 -0000 Author: kevlo Date: Wed Feb 15 05:35:37 2012 New Revision: 231740 URL: http://svn.freebsd.org/changeset/base/231740 Log: MFC r224703: In rtinit1(), before rtrequest1_fib() is called, info.rti_flags is initialized by flags (function argument) or-ed with ifa->ifa_flags. If both NIC has a loopback route to itself, so IFA_RTSELF is set on ifa(s). As IFA_RTSELF is defined by RTF_HOST, rtrequest1_fib() is called with RTF_HOST flag even if netmask is not NULL. Consequently, netmask is set to zero in rtrequest1_fib(), and request to add network route is changed under hands to request to add host route. Tested by: Andrew Boyer Submitted by: Svatopluk Kraus Modified: stable/8/sys/net/route.c Modified: stable/8/sys/net/route.c ============================================================================== --- stable/8/sys/net/route.c Wed Feb 15 04:09:43 2012 (r231739) +++ stable/8/sys/net/route.c Wed Feb 15 05:35:37 2012 (r231740) @@ -1483,7 +1483,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int */ bzero((caddr_t)&info, sizeof(info)); info.rti_ifa = ifa; - info.rti_flags = flags | ifa->ifa_flags; + info.rti_flags = flags | (ifa->ifa_flags & ~IFA_RTSELF); info.rti_info[RTAX_DST] = dst; /* * doing this for compatibility reasons