summaryrefslogtreecommitdiff
path: root/net/bridge
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@amazon.com>2023-11-02 14:05:48 -0700
committerDavid S. Miller <davem@davemloft.net>2023-11-06 08:59:54 +0000
commit0a8e987dcc13244b5a5bc90cb1b184f813104d87 (patch)
tree013e6e5ce99877c4f5d47011ea1e84c738098ce8 /net/bridge
parent3423ca23e08bf285a324237abe88e7e7d9becfe6 (diff)
tcp: Fix SYN option room calculation for TCP-AO.
When building SYN packet in tcp_syn_options(), MSS, TS, WS, and SACKPERM are used without checking the remaining bytes in the options area. To keep that logic as is, we limit the TCP-AO MAC length in tcp_ao_parse_crypto(). Currently, the limit is calculated as below. MAX_TCP_OPTION_SPACE - TCPOLEN_TSTAMP_ALIGNED - TCPOLEN_WSCALE_ALIGNED - TCPOLEN_SACKPERM_ALIGNED This looks confusing as (1) we pack SACKPERM into the leading 2-bytes of the aligned 12-bytes of TS and (2) TCPOLEN_MSS_ALIGNED is not used. Fortunately, the calculated limit is not wrong as TCPOLEN_SACKPERM_ALIGNED and TCPOLEN_MSS_ALIGNED are the same value. However, we should use the proper constant in the formula. MAX_TCP_OPTION_SPACE - TCPOLEN_MSS_ALIGNED - TCPOLEN_TSTAMP_ALIGNED - TCPOLEN_WSCALE_ALIGNED Fixes: 4954f17ddefc ("net/tcp: Introduce TCP_AO setsockopt()s") Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Reviewed-by: Dmitry Safonov <dima@arista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
0 files changed, 0 insertions, 0 deletions