Commit b21a1690 authored by Jeroen van Ingen Schenau's avatar Jeroen van Ingen Schenau Committed by Greg Kroah-Hartman
Browse files

selftests/bpf: Fix erroneous bitmask operation



[ Upstream commit b6a3451e ]

xdp_synproxy_kern.c is a BPF program that generates SYN cookies on
allowed TCP ports and sends SYNACKs to clients, accelerating synproxy
iptables module.

Fix the bitmask operation when checking the status of an existing
conntrack entry within tcp_lookup() function. Do not AND with the bit
position number, but with the bitmask value to check whether the entry
found has the IPS_CONFIRMED flag set.

Fixes: fb5cd0ce ("selftests/bpf: Add selftests for raw syncookie helpers")
Signed-off-by: default avatarJeroen van Ingen Schenau <jeroen.vaningenschenau@novoserve.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Tested-by: default avatarMinh Le Hoang <minh.lehoang@novoserve.com>
Link: https://lore.kernel.org/xdp-newbies/CAAi1gX7owA+Tcxq-titC-h-KPM7Ri-6ZhTNMhrnPq5gmYYwKow@mail.gmail.com/T/#u
Link: https://lore.kernel.org/bpf/20231130120353.3084-1-jeroen.vaningenschenau@novoserve.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ff993518
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment