From 6f45349197676a433c965b8c4cae2f77e657b056 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Wed, 3 Apr 2024 21:03:26 +0200 Subject: [PATCH] lib: add srv6 bsid to seg6local_context2str Add SRv6 Binding SID END.B6.Encaps nh6 str to lib. It is used to display nh6 when one uses 'show ipv6 route'. Signed-off-by: Dmytro Shytyi Signed-off-by: Philippe Guibert --- lib/srv6.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/srv6.c b/lib/srv6.c index dceb6ab48bb9..a82103e423e9 100644 --- a/lib/srv6.c +++ b/lib/srv6.c @@ -94,9 +94,11 @@ const char *seg6local_context2str(char *str, size_t size, snprintf(str, size, "table %u", ctx->table); return str; - case ZEBRA_SEG6_LOCAL_ACTION_END_DX2: case ZEBRA_SEG6_LOCAL_ACTION_END_B6: case ZEBRA_SEG6_LOCAL_ACTION_END_B6_ENCAP: + snprintfrr(str, size, "nh6 %pI6", &ctx->nh6); + return str; + case ZEBRA_SEG6_LOCAL_ACTION_END_DX2: case ZEBRA_SEG6_LOCAL_ACTION_END_BM: case ZEBRA_SEG6_LOCAL_ACTION_END_S: case ZEBRA_SEG6_LOCAL_ACTION_END_AS: