aboutsummaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'vnet')
-rw-r--r--vnet/test/lisp-cp/test_cp_serdes.c4
-rw-r--r--vnet/test/lisp-cp/test_lisp_types.c4
-rw-r--r--vnet/vnet/lisp-cp/lisp_types.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/vnet/test/lisp-cp/test_cp_serdes.c b/vnet/test/lisp-cp/test_cp_serdes.c
index 2d1cf06269b..5343d0e47dc 100644
--- a/vnet/test/lisp-cp/test_cp_serdes.c
+++ b/vnet/test/lisp-cp/test_cp_serdes.c
@@ -318,7 +318,7 @@ static clib_error_t * test_lisp_msg_put_mreq_with_lcaf ()
0x00, 0x00, /* reserved1, flags */
0x02, /* type = Instance ID */
0x17, /* IID mask-len */
- 0x00, 0x0a, /* iid length + next AFI lenght */
+ 0x00, 0x0a, /* lenght */
0x90, 0x91, 0x92, 0x93, /* IID / VNI */
0x00, 0x01, /* AFI = ipv4 */
@@ -522,7 +522,7 @@ test_lisp_parse_lcaf ()
0x00, 0x00, /* reserved1, flags */
0x02, /* type = Instance ID */
0x18, /* IID mask-len */
- 0x0a, 0x00, /* iid length + next AFI lenght */
+ 0x00, 0x0a, /* lenght */
/* LCAF Instance ID */
0x00, 0x00, 0x00, 0x09, /* iid */
0x00, 0x01, /* AFI = ipv4 */
diff --git a/vnet/test/lisp-cp/test_lisp_types.c b/vnet/test/lisp-cp/test_lisp_types.c
index 24443e99565..8aa9d41824d 100644
--- a/vnet/test/lisp-cp/test_lisp_types.c
+++ b/vnet/test/lisp-cp/test_lisp_types.c
@@ -394,7 +394,7 @@ test_src_dst_with_vni_serdes (void)
0x12, 0x34, 0x56, 0x78, /* reserved; source-ML, Dest-ML */
0x40, 0x03, 0x00, 0x00, /* AFI = LCAF, reserved1, flags */
- 0x0c, 0x00, 0x00, 0x14, /* LCAF type = source/dest key, rsvd, length */
+ 0x0c, 0x00, 0x00, 0x10, /* LCAF type = source/dest key, rsvd, length */
0x00, 0x00, 0x18, 0x10, /* reserved; source-ML, Dest-ML */
0x00, 0x01, /* AFI = ip4 */
@@ -458,7 +458,7 @@ test_src_dst_serdes (void)
u8 expected_data[] =
{
0x40, 0x03, 0x00, 0x00, /* AFI = LCAF, reserved1, flags */
- 0x0c, 0x00, 0x00, 0x18, /* LCAF type = source/dest key, rsvd, length */
+ 0x0c, 0x00, 0x00, 0x14, /* LCAF type = source/dest key, rsvd, length */
0x00, 0x00, 0x00, 0x00, /* reserved; source-ML, Dest-ML */
0x40, 0x05, /* AFI = MAC */
diff --git a/vnet/vnet/lisp-cp/lisp_types.c b/vnet/vnet/lisp-cp/lisp_types.c
index d206e6bccef..5ab4a5eb449 100644
--- a/vnet/vnet/lisp-cp/lisp_types.c
+++ b/vnet/vnet/lisp-cp/lisp_types.c
@@ -1099,7 +1099,7 @@ sd_write (u8 * p, void *a)
size += sizeof (u16);
memset (h, 0, sizeof (h[0]));
LCAF_TYPE (h) = LCAF_SOURCE_DEST;
- u16 lcaf_len = 4 + sizeof (lcaf_src_dst_hdr_t)
+ u16 lcaf_len = sizeof (lcaf_src_dst_hdr_t)
+ fid_addr_size_to_write (&sd_src (sd))
+ fid_addr_size_to_write (&sd_dst (sd));
LCAF_LENGTH (h) = clib_host_to_net_u16 (lcaf_len);