tcp: properly initialize LRD while accepting session in syncache

Inherit the setting from the listener socket in syncache_socket.

MFC after:             2 weeks
Reviewed By:           tuexen, #transport
Sponsored by:          NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D42874
This commit is contained in:
Richard Scheffenegger 2023-12-02 12:15:37 +01:00
parent ebb1e0f193
commit f071abd92e

View file

@ -952,7 +952,8 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m)
tp->rcv_adv += tp->rcv_wnd;
tp->last_ack_sent = tp->rcv_nxt;
tp->t_flags = sototcpcb(lso)->t_flags & (TF_NOPUSH|TF_NODELAY);
tp->t_flags = sototcpcb(lso)->t_flags &
(TF_LRD|TF_NOPUSH|TF_NODELAY);
if (sc->sc_flags & SCF_NOOPT)
tp->t_flags |= TF_NOOPT;
else {