diff options
author | David Ahern <dsa@cumulusnetworks.com> | 2017-03-10 22:11:39 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-22 11:43:34 (GMT) |
commit | 87c0286a07f93edc874c861a9159e586fc51ee6b (patch) | |
tree | 4182cc0497cfb11728b8532ca5dc60c159d07cd1 /net/mac80211/debugfs.h | |
parent | b61206e253020adbfde31f662ec7b5ea8b54935f (diff) | |
download | linux-87c0286a07f93edc874c861a9159e586fc51ee6b.tar.xz |
mpls: Do not decrement alive counter for unregister events
[ Upstream commit 79099aab38c8f5c746748b066ae74ba984fe2cc8 ]
Multipath routes can be rendered usesless when a device in one of the
paths is deleted. For example:
$ ip -f mpls ro ls
100
nexthop as to 200 via inet 172.16.2.2 dev virt12
nexthop as to 300 via inet 172.16.3.2 dev br0
101
nexthop as to 201 via inet6 2000:2::2 dev virt12
nexthop as to 301 via inet6 2000:3::2 dev br0
$ ip li del br0
When br0 is deleted the other hop is not considered in
mpls_select_multipath because of the alive check -- rt_nhn_alive
is 0.
rt_nhn_alive is decremented once in mpls_ifdown when the device is taken
down (NETDEV_DOWN) and again when it is deleted (NETDEV_UNREGISTER). For
a 2 hop route, deleting one device drops the alive count to 0. Since
devices are taken down before unregistering, the decrement on
NETDEV_UNREGISTER is redundant.
Fixes: c89359a42e2a4 ("mpls: support for dead routes")
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/mac80211/debugfs.h')
0 files changed, 0 insertions, 0 deletions