Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jan 2017 08:16:04 +0000
From:      "sepherosa_gmail.com (Sepherosa Ziehau)" <phabric-noreply@FreeBSD.org>
To:        freebsd-net@freebsd.org
Subject:   [Differential] D8904: inet: Fix routing issue by calling if_up()
Message-ID:  <1d52e015db4bdb5f8ff82d7d0c188d57@localhost.localdomain>
In-Reply-To: <differential-rev-PHID-DREV-ep6hmkx4cno4dfdlhp4a-req@FreeBSD.org>
References:  <differential-rev-PHID-DREV-ep6hmkx4cno4dfdlhp4a-req@FreeBSD.org>

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

sepherosa_gmail.com added a comment.


  In https://reviews.freebsd.org/D8904#185970, @karels wrote:
  
  > I think the change is a step in the right direction.  Certainly, "ifconfig xxN down" followed by an implicit UP should not cause any change to the routing table.  Does anyone know why the "down" is removing the route?  That seems wrong to me.
  
  
  IMHO, it's mainly because the radix tree only uses the target address to do the search.  So if you don't remove the prefix routes when bringing down the interface, radix search will end up w/ the route w/ a stopped interface; callers of the radix search don't have options to change this behaviour.
  
  If we don't delete the prefix routes if the interface is down, the following senario will not work:
  
    GW --- NET_A --- if0 HOST1
     |                    if1
     |                     |
     +---- NET_B ----------+
  
  Given HOST1's default gwy is GW.  If if1 is brought down, but the NET_B's prefix route is not deleted, HOST1 will not be able to reach NET_B anymore, since the radix search always ends up w/ the route backed by if1.

REVISION DETAIL
  https://reviews.freebsd.org/D8904

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: sepherosa_gmail.com, delphij, royger, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com, adrian, bz, gnn, hiren, glebius, rwatson, karels
Cc: hrs, freebsd-net-list


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