diff options
author | David S. Miller <davem@davemloft.net> | 2019-10-26 11:25:53 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-26 11:25:53 -0700 |
commit | 45f338069941f799ecc22e5a51b423da0b32459d (patch) | |
tree | fa364760ca18a790a3949caef5a3fc47bcc3ab1a /net | |
parent | 5ff223e86f5addbfae26419cbb5d61d98f6fbf7d (diff) | |
parent | 37de3b354150450ba12275397155e68113e99901 (diff) | |
download | linux-45f338069941f799ecc22e5a51b423da0b32459d.tar.bz2 |
Merge branch 'ipv4-fix-route-update-on-metric-change'
Paolo Abeni says:
====================
ipv4: fix route update on metric change.
This fixes connected route update on some edge cases for ip addr metric
change.
It additionally includes self tests for the covered scenarios. The new tests
fail on unpatched kernels and pass on the patched one.
v1 -> v2:
- add selftests
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/fib_frontend.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index dde77f72e03e..71c78d223dfd 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c @@ -1148,7 +1148,7 @@ void fib_modify_prefix_metric(struct in_ifaddr *ifa, u32 new_metric) if (!(dev->flags & IFF_UP) || ifa->ifa_flags & (IFA_F_SECONDARY | IFA_F_NOPREFIXROUTE) || ipv4_is_zeronet(prefix) || - prefix == ifa->ifa_local || ifa->ifa_prefixlen == 32) + (prefix == ifa->ifa_local && ifa->ifa_prefixlen == 32)) return; /* add the new */ |