wireguard: coverity fix

explicit null dereferenced

Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: Id1e4b0e048dbd0a68063c63374172ab6d3653aff
This commit is contained in:
Artem Glazychev
2021-02-17 13:24:17 +07:00
committed by Damjan Marion
parent 63ab85130c
commit cb1c4902bb
+12 -11
View File
@@ -22,16 +22,17 @@
#include <wireguard/wireguard_send.h>
#include <wireguard/wireguard_if.h>
#define foreach_wg_input_error \
_(NONE, "No error") \
_(HANDSHAKE_MAC, "Invalid MAC handshake") \
_(PEER, "Peer error") \
_(INTERFACE, "Interface error") \
_(DECRYPTION, "Failed during decryption") \
_(KEEPALIVE_SEND, "Failed while sending Keepalive") \
_(HANDSHAKE_SEND, "Failed while sending Handshake") \
_(TOO_BIG, "Packet too big") \
_(UNDEFINED, "Undefined error")
#define foreach_wg_input_error \
_ (NONE, "No error") \
_ (HANDSHAKE_MAC, "Invalid MAC handshake") \
_ (PEER, "Peer error") \
_ (INTERFACE, "Interface error") \
_ (DECRYPTION, "Failed during decryption") \
_ (KEEPALIVE_SEND, "Failed while sending Keepalive") \
_ (HANDSHAKE_SEND, "Failed while sending Handshake") \
_ (HANDSHAKE_RECEIVE, "Failed while receiving Handshake") \
_ (TOO_BIG, "Packet too big") \
_ (UNDEFINED, "Undefined error")
typedef enum
{
@@ -245,7 +246,7 @@ wg_handshake_process (vlib_main_t * vm, wg_main_t * wmp, vlib_buffer_t * b)
break;
}
default:
break;
return WG_INPUT_ERROR_HANDSHAKE_RECEIVE;
}
wg_timers_any_authenticated_packet_received (peer);