Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Aug 2011 13:14:20 GMT
From:      Svatopluk Kraus <onwahe@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/159603: [patch] in_ifscrubprefix() - network route can be installed for interfaces marked down
Message-ID:  <201108081314.p78DEKK8011623@red.freebsd.org>
Resent-Message-ID: <201108081320.p78DKDcI006668@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         159603
>Category:       kern
>Synopsis:       [patch] in_ifscrubprefix() - network route can be installed for interfaces marked down
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 08 13:20:13 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Svatopluk Kraus
>Release:        current
>Organization:
>Environment:
>Description:
If interface goes down, then network route is deleted via in_ifscrubprefix() and can be replaced by same one on another interface. Interfaces marked down are not skipped during lookup.
>How-To-Repeat:

>Fix:
Index: sys/netinet/in.c
===================================================================
--- sys/netinet/in.c	(revision 224705)
+++ sys/netinet/in.c	(working copy)
@@ -1163,7 +1163,8 @@
 			p.s_addr &= ia->ia_sockmask.sin_addr.s_addr;
 		}
 
-		if (prefix.s_addr != p.s_addr)
+		if ((prefix.s_addr != p.s_addr) ||
+		    !(ia->ia_ifp->if_flags & IFF_UP))
 			continue;
 
 		/*


>Release-Note:
>Audit-Trail:
>Unformatted:



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