aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--[-rwxr-xr-x]src/plugins/wireguard/wireguard_input.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/plugins/wireguard/wireguard_input.c b/src/plugins/wireguard/wireguard_input.c
index 2690cf5e097..5db814292f8 100755..100644
--- a/src/plugins/wireguard/wireguard_input.c
+++ b/src/plugins/wireguard/wireguard_input.c
@@ -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);