bonding: fix non-null terminated vector 62/23462/2
authorBenoît Ganne <bganne@cisco.com>
Wed, 6 Nov 2019 13:36:38 +0000 (14:36 +0100)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Mon, 18 Nov 2019 13:38:33 +0000 (13:38 +0000)
Type: fix

Change-Id: Iea7d73a304236b525b95bdad3bfdb41e711f8cdb
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit a03c7d5b9280e1cd5d89cb7cc15bd05b56062c95)

src/vnet/bonding/cli.c

index 4ce8672..e65f15d 100644 (file)
@@ -582,8 +582,8 @@ bond_enslave (vlib_main_t * vm, bond_enslave_args_t * args)
     }
   if (bif->mode == BOND_MODE_LACP)
     {
-      u8 *name = format (0, "/if/lacp/%u/%u/state", bif->sw_if_index,
-                        args->slave);
+      u8 *name = format (0, "/if/lacp/%u/%u/state%c", bif->sw_if_index,
+                        args->slave, 0);
 
       vec_validate (bm->stats, bif->sw_if_index);
       vec_validate (bm->stats[bif->sw_if_index], args->slave);