diff options
author | Benjamin Poirier <bpoirier@cumulusnetworks.com> | 2020-02-12 04:41:06 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-11 20:02:47 +0300 |
commit | 84c4d6642d7bb79e19458bb337c982209c3a46ac (patch) | |
tree | 48360238c4640e5cd1566a1101e281b321881a18 /net/wimax | |
parent | 14d5cc5ca2cef873b7caa991c3d7d38799a38ffa (diff) | |
download | linux-84c4d6642d7bb79e19458bb337c982209c3a46ac.tar.xz |
ipv6: Fix route replacement with dev-only route
[ Upstream commit e404b8c7cfb31654c9024d497cec58a501501692 ]
After commit 27596472473a ("ipv6: fix ECMP route replacement") it is no
longer possible to replace an ECMP-able route by a non ECMP-able route.
For example,
ip route add 2001:db8::1/128 via fe80::1 dev dummy0
ip route replace 2001:db8::1/128 dev dummy0
does not work as expected.
Tweak the replacement logic so that point 3 in the log of the above commit
becomes:
3. If the new route is not ECMP-able, and no matching non-ECMP-able route
exists, replace matching ECMP-able route (if any) or add the new route.
We can now summarize the entire replace semantics to:
When doing a replace, prefer replacing a matching route of the same
"ECMP-able-ness" as the replace argument. If there is no such candidate,
fallback to the first route found.
Fixes: 27596472473a ("ipv6: fix ECMP route replacement")
Signed-off-by: Benjamin Poirier <bpoirier@cumulusnetworks.com>
Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/wimax')
0 files changed, 0 insertions, 0 deletions