sr: fix srv6 definition of behavior associated to a LocalSID 12/33312/5
authorFrancesco Lombardo <franclombardo@gmail.com>
Fri, 30 Jul 2021 13:54:01 +0000 (15:54 +0200)
committerBeno�t Ganne <bganne@cisco.com>
Mon, 21 Mar 2022 18:18:00 +0000 (18:18 +0000)
The behavior associateted to a LocalSID accordig to the definition should be u8 instead of u16;

Type: fix

Signed-off-by: Francesco Lombardo <franclombardo@gmail.com>
Change-Id: I6dd60d5facc1c3f20900cb393619349e82eef38c
Signed-off-by: Francesco Lombardo <franclombardo@gmail.com>
src/vnet/srv6/sr.h
src/vnet/srv6/sr_api.c

index ea9ff70..507f8df 100644 (file)
@@ -128,7 +128,7 @@ typedef struct
 
   char end_psp;                                        /**< Combined with End.PSP? */
 
-  u16 behavior;                                        /**< Behavior associated to this localsid */
+  u8 behavior; /**< Behavior associated to this localsid */
 
   union
   {
index c68b355..7192498 100644 (file)
@@ -217,7 +217,7 @@ static void send_sr_localsid_details
   rmp->_vl_msg_id = ntohs (REPLY_MSG_ID_BASE + VL_API_SR_LOCALSIDS_DETAILS);
   ip6_address_encode (&t->localsid, rmp->addr);
   rmp->end_psp = t->end_psp;
-  rmp->behavior = htons (t->behavior);
+  rmp->behavior = t->behavior;
   rmp->fib_table = htonl (t->fib_table);
   rmp->vlan_index = htonl (t->vlan_index);
   ip_address_encode (&t->next_hop, IP46_TYPE_ANY, &rmp->xconnect_nh_addr);