Skip to content
Commit 0741be35 authored by Petar Penkov's avatar Petar Penkov Committed by Daniel Borkmann
Browse files

bpf: fix error check in bpf_tcp_gen_syncookie



If a SYN cookie is not issued by tcp_v#_gen_syncookie, then the return
value will be exactly 0, rather than <= 0. Let's change the check to
reflect that, especially since mss is an unsigned value and cannot be
negative.

Fixes: 70d66244317e ("bpf: add bpf_tcp_gen_syncookie helper")
Reported-by: default avatarStanislav Fomichev <sdf@google.com>
Signed-off-by: default avatarPetar Penkov <ppenkov@google.com>
Acked-by: default avatarSong Liu <songliubraving@fb.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent 736a5530
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment