selftests/bpf: Fix error checking on reading the tcp_fastopen sysctl

There is a typo in checking the "saved_tcp_fo" and instead
"saved_tcp_syncookie" is checked again.  This patch fixes it
and also breaks them into separate if statements such that
the test will abort asap.

Reported-by: David Binderman <>
Signed-off-by: Martin KaFai Lau <>
Signed-off-by: Daniel Borkmann <>
Acked-by: Andrii Nakryiko <>
1 file changed