ip-route: Fix for listing routes with RTAX_LOCK attribute
This fixes a corner-case for routes with a certain metric locked to
| ip route add 192.168.7.0/24 dev eth0 window 0
| ip route add 192.168.7.0/24 dev eth0 window lock 0
Since the kernel doesn't dump the attribute if it is zero, both routes
added above would appear as if they were equal although they are not.
Fix this by taking mxlock value for the given metric into account before
skipping it if it is not present.
Reported-by: Thomas Haller <firstname.lastname@example.org>
Signed-off-by: Phil Sutter <email@example.com>
1 file changed