diff options
author | jlemon <jlemon@FreeBSD.org> | 2002-02-12 02:03:50 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2002-02-12 02:03:50 +0000 |
commit | 04bdc3812f3bc1bf7c855c7c539b9b5e30f79c39 (patch) | |
tree | d268d93099e420dd1652d4897274fd6b5dba6214 | |
parent | 03a880e06db6aa0eb1a01712a3acccf3f560ea10 (diff) | |
download | FreeBSD-src-04bdc3812f3bc1bf7c855c7c539b9b5e30f79c39.zip FreeBSD-src-04bdc3812f3bc1bf7c855c7c539b9b5e30f79c39.tar.gz |
When a duplicate SYN arrives which matches an entry in the syncache,
update our lazy reference to the inpcb structure, as it may have changed.
Found by: dima
-rw-r--r-- | sys/netinet/tcp_syncache.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index f78a851..669a3b6 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -839,6 +839,11 @@ syncache_add(inc, to, th, sop, m) */ if (sc->sc_flags & SCF_TIMESTAMP) sc->sc_tsrecent = to->to_tsval; + /* + * PCB may have changed, pick up new values. + */ + sc->sc_tp = tp; + sc->sc_inp_gencnt = tp->t_inpcb->inp_gencnt; if (syncache_respond(sc, m) == 0) { s = splnet(); TAILQ_REMOVE(&tcp_syncache.timerq[sc->sc_rxtslot], |