summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/receive.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/receive.c b/src/receive.c
index 867703c..9085d71 100644
--- a/src/receive.c
+++ b/src/receive.c
@@ -222,9 +222,8 @@ void packet_consume_data_done(struct sk_buff *skb, struct wireguard_peer *peer,
} else
goto dishonest_packet_type;
- if (unlikely(len > skb->len)) {
+ if (unlikely(len > skb->len))
goto dishonest_packet_size;
- }
if (len < skb->len && unlikely(pskb_trim(skb, len)))
goto packet_processed;