With the following patch, the BPF_SOCK_OPS_GEN_SYNCOOKIE_CB program can utilise the TCP Timestamps option as another storage to encode client information. Then, we use bpf_sock_ops.replylong[1] as the user interface to pass the timestamp value. Signed-off-by: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx> --- net/core/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/filter.c b/net/core/filter.c index cc2e4babc85f..276abecf5d90 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -9079,7 +9079,7 @@ static bool sock_ops_is_valid_access(int off, int size, if (type == BPF_WRITE) { switch (off) { - case offsetof(struct bpf_sock_ops, reply): + case bpf_ctx_range_till(struct bpf_sock_ops, reply, replylong[1]): case offsetof(struct bpf_sock_ops, sk_txhash): if (size != size_default) return false; -- 2.30.2