]> git.puffer.fish Git - mirror/frr.git/commit
zebra: fix uninstallation of LDP labeled static routes 181/head
authorRenato Westphal <renato@opensourcerouting.org>
Tue, 7 Feb 2017 13:42:01 +0000 (11:42 -0200)
committerRenato Westphal <renato@opensourcerouting.org>
Wed, 8 Feb 2017 12:50:03 +0000 (10:50 -0200)
commit9c934a1843308a4d621cfad7699c5b5b79598c06
tree688f814f5d4fafda9c4bdaa7854cd6d7bcfb68c5
parent7df2e1c3797df638016ae6d7a34e1781c0f1ced5
zebra: fix uninstallation of LDP labeled static routes

Problem:
1 - Add a static route: "ip route 10.0.0.0/24 172.16.1.1";
2 - Receive an LDP mapping for 10.0.0.0/24 from 172.16.1.1;
3 - Remove the static route: "no ip route 10.0.0.0/24 172.16.1.1".
4 - Static route is removed but not uninstalled from the kernel.

What happens is that, on static_uninstall_route(), we can't find the
route we want to uninstall because it has an LDP label where the original
static route doesn't have any MPLS label.

To fix this, we can just stop calling static_nexthop_label_same() and
remove this function. It's impossible to have two routes for the same
prefix with the same distance and same nexthop address. This means that
we can lookup the correct route to uninstall without having to check
its labels.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
zebra/zebra_static.c