summaryrefslogtreecommitdiffhomepage
path: root/src/receive.c
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
commit5ee298c4fe47e59b95d6ba4d2ef8b8198569ecf6 (patch)
tree057a75a24f859d6c8115cee7623f66ab14a6232f /src/receive.c
parente9ccb85445153e5fa09d607f9afbd5a78b534844 (diff)
receive: no need to test for !len
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/receive.c')
-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: