From nobody@FreeBSD.org  Mon Aug  8 12:33:12 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 523F11065672
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  8 Aug 2011 12:33:12 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 418438FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  8 Aug 2011 12:33:12 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p78CXBeT027710
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 8 Aug 2011 12:33:11 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p78CXBfQ027704;
	Mon, 8 Aug 2011 12:33:11 GMT
	(envelope-from nobody)
Message-Id: <201108081233.p78CXBfQ027704@red.freebsd.org>
Date: Mon, 8 Aug 2011 12:33:11 GMT
From: Svatopluk Kraus <onwahe@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] in_addprefix() - lookup by source address instead of destination one
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         159600
>Category:       kern
>Synopsis:       [patch] in_addprefix() - lookup by source address instead of destination one
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 08 12:40:11 UTC 2011
>Closed-Date:    Wed Aug 10 06:17:38 UTC 2011
>Last-Modified:  Wed Feb 15 05:40:04 UTC 2012
>Originator:     Svatopluk Kraus
>Release:        current
>Organization:
>Environment:
>Description:
If RTF_HOST flag is specified, then we are interested in destination address.
>How-To-Repeat:

>Fix:
Index: sys/netinet/in.c
===================================================================
--- sys/netinet/in.c	(revision 224705)
+++ sys/netinet/in.c	(working copy)
@@ -1037,7 +1037,7 @@
 	IN_IFADDR_RLOCK();
 	TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) {
 		if (rtinitflags(ia)) {
-			p = ia->ia_addr.sin_addr;
+			p = ia->ia_dstaddr.sin_addr;
 
 			if (prefix.s_addr != p.s_addr)
 				continue;


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: kevlo 
State-Changed-When: Wed Aug 10 06:17:24 UTC 2011 
State-Changed-Why:  
Committed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=159600 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/159600: commit references a PR
Date: Wed, 10 Aug 2011 06:17:15 +0000 (UTC)

 Author: kevlo
 Date: Wed Aug 10 06:17:06 2011
 New Revision: 224747
 URL: http://svn.freebsd.org/changeset/base/224747
 
 Log:
   If RTF_HOST flag is specified, then we are interested in destination
   address.
   
   PR:		kern/159600
   Submitted by:	Svatopluk Kraus <onwahe at gmail dot com>
   Approved by:	re (hrs)
 
 Modified:
   head/sys/netinet/in.c
 
 Modified: head/sys/netinet/in.c
 ==============================================================================
 --- head/sys/netinet/in.c	Tue Aug  9 21:01:36 2011	(r224746)
 +++ head/sys/netinet/in.c	Wed Aug 10 06:17:06 2011	(r224747)
 @@ -1037,7 +1037,7 @@ in_addprefix(struct in_ifaddr *target, i
  	IN_IFADDR_RLOCK();
  	TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) {
  		if (rtinitflags(ia)) {
 -			p = ia->ia_addr.sin_addr;
 +			p = ia->ia_dstaddr.sin_addr;
  
  			if (prefix.s_addr != p.s_addr)
  				continue;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/159600: commit references a PR
Date: Wed, 15 Feb 2012 05:37:59 +0000 (UTC)

 Author: kevlo
 Date: Wed Feb 15 05:37:41 2012
 New Revision: 231741
 URL: http://svn.freebsd.org/changeset/base/231741
 
 Log:
   MFC r224747:
   
   If RTF_HOST flag is specified, then we are interested in destination
   address.
   
   PR:	kern/159600
   Submitted by:	Svatopluk Kraus <onwahe at gmail dot com>
 
 Modified:
   stable/8/sys/netinet/in.c
 
 Modified: stable/8/sys/netinet/in.c
 ==============================================================================
 --- stable/8/sys/netinet/in.c	Wed Feb 15 05:35:37 2012	(r231740)
 +++ stable/8/sys/netinet/in.c	Wed Feb 15 05:37:41 2012	(r231741)
 @@ -1043,7 +1043,7 @@ in_addprefix(struct in_ifaddr *target, i
  	IN_IFADDR_RLOCK();
  	TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) {
  		if (rtinitflags(ia)) {
 -			p = ia->ia_addr.sin_addr;
 +			p = ia->ia_dstaddr.sin_addr;
  
  			if (prefix.s_addr != p.s_addr)
  				continue;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
