From e132dea0643499187cc51a332fd6616ee6df387c Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Thu, 8 Aug 2019 13:56:39 -0300 Subject: zebra: identify MPLS FTNs by route type and instance Use the route type and instance instead of the route distance to identify MPLS FTNs. This is a more robust approach since the routing daemons can modify the distance of their announced routes via configuration, which can cause inconsistencies. Signed-off-by: Renato Westphal --- lib/zclient.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/zclient.c') diff --git a/lib/zclient.c b/lib/zclient.c index 81f0b81f62..3e2c0b24d7 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -2479,7 +2479,8 @@ int zapi_labels_encode(struct stream *s, int cmd, struct zapi_labels *zl) return -1; } stream_putl(s, zl->ifindex); - stream_putc(s, zl->distance); + stream_putc(s, zl->route_type); + stream_putw(s, zl->route_instance); stream_putl(s, zl->local_label); stream_putl(s, zl->remote_label); @@ -2528,7 +2529,8 @@ int zapi_labels_decode(struct stream *s, struct zapi_labels *zl) return -1; } STREAM_GETL(s, zl->ifindex); - STREAM_GETC(s, zl->distance); + STREAM_GETC(s, zl->route_type); + STREAM_GETW(s, zl->route_instance); STREAM_GETL(s, zl->local_label); STREAM_GETL(s, zl->remote_label); -- cgit v1.2.3