Hello, On Tue, 27 Oct 2015, Andy Gospodarek wrote:
> > Of course, we have a semantic problem when setting > > RTNH_F_LINKDOWN on last address removal, i.e. this event > > has nothing to do with the link state. But it works because > > RTNH_F_LINKDOWN is valid for lookups only when DEAD flag > > is not set, so that is why my patch looks this way. > The problem you describe here was a concern of mine as well. I would > really like the output of 'ip route show' to properly reflect the link > state and fix the problem you describe, but it seems like it will not in > this case with your current patch. I'll do a bit more testing and let > you know. Another option is to remove the RTNH_F_LINKDOWN usage from any event, from FIB structs. In case only netif_carrier_ok check is needed, it looks cheap to just call it after the IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN check. When showing it to user space we can again use netif_carrier_ok. The new fib_rebalance() is special, it still needs to be called, just like now on NETDEV_CHANGE event but only when ignore_routes_with_linkdown=1, i.e. we can avoid calling fib_sync_up/fib_sync_down_dev in fib_netdev_event if the flag is not set, guarded by CONFIG_IP_ROUTE_MULTIPATH check. To make this work we can also call somehow fib_rebalance() from devinet_conf_proc() context when the flag is changed, all this is for the CONFIG_IP_ROUTE_MULTIPATH case. Regards -- Julian Anastasov <j...@ssi.bg> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html