I Ido Schimmel #
This set tries to eliminate some differences between IPv4's and IPv6's treatment of nexthops. These differences are most likely a side effect of IPv6's data structures (specifically 'rt6_info') that incorporate both the route and the nexthop and the late addition of ECMP support in commit 51ebd3181572 ("ipv6: add support of equal cost multipath (ECMP)"). When a netdev is unregistered, IPv4 flushes all the routes using the netdev as their nexthop device. This includes multipath routes. In IPv6, sibling routes in a multipath route are unaffected. In addition, a netdev that is put administratively down causes IPv4 to mark all the nexthops using it as 'dead'. A route is only flushed when all of its nexthops are dead. IPv6 on the other hand simply flushes all the routes using the netdev as their nexthop device. This includes sibling routes in a multipath route. These differences stem from the fact that the IPv6 code evaluates routes without taking into consideration the state of their siblings in a multipath route. This makes it difficult to introduce features such as non-equal-cost multipath that are built on top of this set [1]. The first 12 patches introduce non-functional changes that store the RTNH_F_DEAD and RTNH_F_LINKDOWN flags in IPv6 routes based on netdev events, in a similar fashion to IPv4. This allows us to remove the carrier check performed during route lookup and dump. The next four patches finally eliminate the above mentioned differences. First, by flushing all the sibling routes when a nexthop device in a sibling route is unregistered. Then, by only flushing a multipath route when all of its nexthops are dead. Last three patches add test cases for IPv4/IPv6 FIB. These verify that both address families react similarly to netdev events. 1. https://github.com/idosch/linux/tree/ipv6-nexthops Ido Schimmel (19): ipv6: Remove redundant route flushing during namespace dismantle ipv6: Mark dead nexthops with appropriate flags