wireguard: peers dump fix 93/33993/2
authorArtem Glazychev <artem.glazychev@xored.com>
Thu, 7 Oct 2021 09:20:38 +0000 (16:20 +0700)
committerDamjan Marion <dmarion@me.com>
Thu, 7 Oct 2021 15:38:50 +0000 (15:38 +0000)
Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: I4450b8c8b50a3be8d6a399f6a58bc0e8eb500b28

src/plugins/wireguard/wireguard_api.c

index d97ea8e..4cb40a1 100644 (file)
@@ -259,7 +259,7 @@ vl_api_wireguard_peers_dump_t_handler (vl_api_wireguard_peers_dump_t * mp)
   if (mp->peer_index == ~0)
     wg_peer_walk (wg_api_send_peers_details, &ctx);
   else
-    wg_api_send_peers_details (mp->peer_index, &ctx);
+    wg_api_send_peers_details (ntohl (mp->peer_index), &ctx);
 }
 
 static vpe_client_registration_t *