Yan Zhai a171fbec88 lwt: Check LWTUNNEL_XMIT_CONTINUE strictly
LWTUNNEL_XMIT_CONTINUE is implicitly assumed in ip(6)_finish_output2,
such that any positive return value from a xmit hook could cause
unexpected continue behavior, despite that related skb may have been
freed. This could be error-prone for future xmit hook ops. One of the
possible errors is to return statuses of dst_output directly.

To make the code safer, redefine LWTUNNEL_XMIT_CONTINUE value to
distinguish from dst_output statuses and check the continue
condition explicitly.

Fixes: 3a0af8fd61f9 ("bpf: BPF for lightweight tunnel infrastructure")
Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Yan Zhai <yan@cloudflare.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/96b939b85eda00e8df4f7c080f770970a4c5f698.1692326837.git.yan@cloudflare.com
2023-08-18 16:05:26 +02:00
..
2023-05-31 13:06:57 +02:00
2023-03-16 17:34:40 -07:00
2023-07-19 20:36:16 -07:00
2023-08-16 11:09:16 +01:00
2023-07-03 11:26:05 -07:00
2023-06-24 15:41:46 -07:00
2023-08-16 20:09:43 -07:00
2023-06-28 16:43:10 -07:00
2023-08-16 10:22:16 -07:00