summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-07-10 20:45:52 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2016-07-10 21:44:38 +0200
commitfc41574d72f4a07a4d56aa594a020d8a7b3753e1 (patch)
treef45378b3667448360141fd9eb90b726a8c1e3457 /src
parenttimers: apply slack to hotpath timers (diff)
downloadwireguard-monolithic-historical-fc41574d72f4a07a4d56aa594a020d8a7b3753e1.tar.xz
wireguard-monolithic-historical-fc41574d72f4a07a4d56aa594a020d8a7b3753e1.zip
receive: no need to test for !len
Diffstat (limited to 'src')
-rw-r--r--src/receive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/receive.c b/src/receive.c
index 2994c02..11fc700 100644
--- a/src/receive.c
+++ b/src/receive.c
@@ -275,7 +275,7 @@ void packet_receive(struct wireguard_device *wg, struct sk_buff *skb)
static const u8 addr;
#endif
- if (unlikely(skb_data_offset(skb, &offset, &len) < 0 || !len))
+ if (unlikely(skb_data_offset(skb, &offset, &len) < 0))
goto err;
switch (message_determine_type(skb->data + offset, len)) {
case MESSAGE_HANDSHAKE_INITIATION: