MSS clamping with XDP/eBPF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm trying to perform some basic TCP MSS clamping with eBPF and it's
being harder than expected:

* Parsing TCP options can be challenging for the eBPF verifier as it's
been shown in [1] by Christian Deacon.
* bpf_store_hdr_opt() introduced in [2] doesn't seem to be useful here
cause it refuses to overwrite an existing TCP option and MSS is
already set when BPF_SOCK_OPS_WRITE_HDR_OPT_CB is triggered.
* bpf_setsockopt() isn't able to set TCP_MAXSEG per [3].

Am I missing something?

Thanks,
Valentin Gutierrez

[1] https://github.com/gamemann/XDP-TCP-Header-Options/
[2] https://lore.kernel.org/bpf/20200730205748.3354954-1-kafai@xxxxxx/T/
[3] https://github.com/torvalds/linux/blob/d2f51b3516dade79269ff45eae2a7668ae711b25/net/core/filter.c#L5151



[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux