X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ftcp%2Ftcp.c;h=28231763da1bc416c46bdc49045e1115dbfeb19d;hb=ff19e3bf4fc10d17e3bafa798e6048ad473c6bd8;hp=f24ddb3a879d7885b34040ebcf16af1336d0d240;hpb=aa3886993c13d71d93ef01dc73b79985d6ec997f;p=vpp.git diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c index f24ddb3a879..28231763da1 100644 --- a/src/vnet/tcp/tcp.c +++ b/src/vnet/tcp/tcp.c @@ -599,6 +599,10 @@ tcp_init_rcv_mss (tcp_connection_t * tc) { u8 ip_hdr_len; + /* Already provided at connection init time */ + if (tc->mss) + return; + ip_hdr_len = tc->c_is_ip4 ? sizeof (ip4_header_t) : sizeof (ip6_header_t); tc->mss = tcp_cfg.default_mtu - sizeof (tcp_header_t) - ip_hdr_len; } @@ -763,6 +767,7 @@ tcp_session_open (transport_endpoint_cfg_t * rmt) tc->cc_algo = tcp_cc_algo_get (tcp_cfg.cc_algo); /* The other connection vars will be initialized after SYN ACK */ tcp_connection_timers_init (tc); + tc->mss = rmt->mss; TCP_EVT (TCP_EVT_OPEN, tc); tc->state = TCP_STATE_SYN_SENT;