On Mon, 21 Oct 2024 18:40:29 +1100 David Gibson <david(a)gibson.dropbear.id.au> wrote:As a rule, we prefer constructing packets with matching C structures, rather than building them byte by byte. However, one case we still build byte by byte is the TCP options we include in SYN packets (in fact the only time we generate TCP options on the tap interface). Rework this to use a structure and initialisers which make it a bit clearer what's going on. Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au>Applied. By the way, since you were wondering: I originally added the NOP option before the MSS option simply because the Linux kernel does that as well: typically, "SACK Permitted" and "Timestamps" (12 bytes altogether, hence aligned) come first, then NOP, then MSS. -- Stefano