diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-06-01 06:46:25 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-06-01 06:46:25 +0200 |
commit | 0f6f08010228c2b4d3a38c66f8e9cfd1d23ad5f3 (patch) | |
tree | c9bf451c20cbd942880e781952b15d6bf268bb92 /src/data.c | |
parent | 0ee5757d36ef3ef02646e34eb465b52a33fa910d (diff) |
receive: trim incoming packets to IP header length
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/data.c')
-rw-r--r-- | src/data.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -192,7 +192,7 @@ static inline bool skb_decrypt(struct sk_buff *skb, struct noise_symmetric_key * if (!chacha20poly1305_decrypt_sg(sg, sg, skb->len, NULL, 0, PACKET_CB(skb)->nonce, key->key)) return false; - return pskb_trim(skb, skb->len - noise_encrypted_len(0)) == 0; + return !pskb_trim(skb, skb->len - noise_encrypted_len(0)); } static inline bool get_encryption_nonce(u64 *nonce, struct noise_symmetric_key *key) |