Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Feb 2012 05:35:37 +0000 (UTC)
From:      Kevin Lo <kevlo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r231740 - stable/8/sys/net
Message-ID:  <201202150535.q1F5ZbZs039139@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <aboyer at averesystems.com>
  Submitted by:	Svatopluk Kraus <onwahe at gmail dot com>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202150535.q1F5ZbZs039139>