summaryrefslogtreecommitdiffstatshomepage
path: root/src/receive.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/receive.c')
-rw-r--r--src/receive.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/receive.c b/src/receive.c
index 36502dc..2e91b67 100644
--- a/src/receive.c
+++ b/src/receive.c
@@ -147,13 +147,13 @@ static void receive_handshake_packet(struct wireguard_device *wg, struct sk_buff
}
break;
}
- default:
+ }
+
+ if (unlikely(!peer)) {
WARN(1, "Somehow a wrong type of packet wound up in the handshake queue!\n");
return;
}
- BUG_ON(!peer);
-
local_bh_disable();
rx_stats(peer, skb->len);
local_bh_enable();