wireguard: fix uninitialized peer index in handoff 84/29084/2
authorFlorin Coras <fcoras@cisco.com>
Fri, 25 Sep 2020 00:18:13 +0000 (17:18 -0700)
committerFlorin Coras <fcoras@cisco.com>
Fri, 25 Sep 2020 00:19:12 +0000 (17:19 -0700)
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I41513b9aa6ca0db1fb9392a15e5ac329a635ebfa

src/plugins/wireguard/wireguard_handoff.c

index b0b7422..8a2efa5 100644 (file)
@@ -79,7 +79,7 @@ wg_handoff (vlib_main_t * vm,
   while (n_left_from > 0)
     {
       const wg_peer_t *peer;
-      index_t peeri;
+      index_t peeri = INDEX_INVALID;
 
       if (PREDICT_FALSE (mode == WG_HANDOFF_HANDSHAKE))
        {