summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDavid Ahern <dsa@cumulusnetworks.com>2017-03-13 16:49:10 -0700
committerDavid S. Miller <davem@davemloft.net>2017-03-16 20:22:18 -0700
commit61733c91c454a61be0ffc93fe46a5d5f2f048c1c (patch)
tree47d0a7c83af4219789d6ce032dc713f4a0929840 /lib
parentbc9ab9231ec8c08352ea860480523d88a221a68f (diff)
downloadlinux-61733c91c454a61be0ffc93fe46a5d5f2f048c1c.tar.gz
linux-61733c91c454a61be0ffc93fe46a5d5f2f048c1c.tar.bz2
linux-61733c91c454a61be0ffc93fe46a5d5f2f048c1c.zip
net: mpls: Fix nexthop alive tracking on down events
Alive tracking of nexthops can account for a link twice if the carrier goes down followed by an admin down of the same link rendering multipath routes useless. This is similar to 79099aab38c8 for UNREGISTER events and DOWN events. Fix by tracking number of alive nexthops in mpls_ifdown similar to the logic in mpls_ifup. Checking the flags per nexthop once after all events have been processed is simpler than trying to maintian a running count through all event combinations. Also, WRITE_ONCE is used instead of ACCESS_ONCE to set rt_nhn_alive per a comment from checkpatch: WARNING: Prefer WRITE_ONCE(<FOO>, <BAR>) over ACCESS_ONCE(<FOO>) = <BAR> Fixes: c89359a42e2a4 ("mpls: support for dead routes") Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Acked-by: Robert Shearman <rshearma@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions