aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-08-11 18:26:23 -0700
committerNeale Ranns <nranns@cisco.com>2017-08-12 20:02:19 +0000
commit44fe506ff3b9428180551ccf8eb3a5d3e24e5660 (patch)
treeabc752be5912a158cb8634208256d340503cad54 /src/vnet
parent3f6ff19a30e9fbe5befb4cc3521d1812e5612197 (diff)
LISP: fix fid nsh address formatting
Change-Id: I912fa53c02c720901c9fb253550790829107de39 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/lisp-cp/lisp_types.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vnet/lisp-cp/lisp_types.c b/src/vnet/lisp-cp/lisp_types.c
index e50c3aa1877..622f39afe6a 100644
--- a/src/vnet/lisp-cp/lisp_types.c
+++ b/src/vnet/lisp-cp/lisp_types.c
@@ -234,6 +234,13 @@ format_nsh_address (u8 * s, va_list * args)
}
u8 *
+format_fid_nsh_address (u8 * s, va_list * args)
+{
+ u32 *a = va_arg (*args, u32 *);
+ return format (s, "SPI:%d SI:%d", *a >> 8, *a & 0xff);
+}
+
+u8 *
format_fid_address (u8 * s, va_list * args)
{
fid_address_t *a = va_arg (*args, fid_address_t *);
@@ -245,7 +252,7 @@ format_fid_address (u8 * s, va_list * args)
case FID_ADDR_MAC:
return format (s, "%U", format_mac_address, &fid_addr_mac (a));
case FID_ADDR_NSH:
- return format (s, "%U", format_nsh_address, &fid_addr_nsh (a));
+ return format (s, "%U", format_fid_nsh_address, &fid_addr_nsh (a));
default:
clib_warning ("Can't format fid address type %d!", fid_addr_type (a));