diff options
author | Randall Stewart <rrs@FreeBSD.org> | 2021-06-24 18:42:21 +0000 |
---|---|---|
committer | Randall Stewart <rrs@FreeBSD.org> | 2021-06-24 18:42:21 +0000 |
commit | 66aec14a5391bda1e9a20f5e4381626797c3e0fb (patch) | |
tree | 9cafacc8ddf50a502e42cd47df288ce08f714ff2 | |
parent | 6ba108e52d175b6833437c8627ae5d0546a4e102 (diff) | |
download | src-66aec14a5391bda1e9a20f5e4381626797c3e0fb.tar.gz src-66aec14a5391bda1e9a20f5e4381626797c3e0fb.zip |
tcp: Rack not being very friendly with V6:4 socket and having a connection from V4
There were two bugs that prevented V4 sockets from connecting to
a rack server running a V4/V6 socket. As well as a bug that stops the
mapped v4 in V6 address from working.
Reviewed by: mtuexen
Sponsored by: Netflix Inc
Differential Revision: https://reviews.freebsd.org/D30885
-rw-r--r-- | sys/netinet/tcp_stacks/rack.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index e37eedec460a..521fd6c625f5 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -12491,6 +12491,9 @@ rack_fini(struct tcpcb *tp, int32_t tcb_is_purged) static void rack_set_state(struct tcpcb *tp, struct tcp_rack *rack) { + if ((rack->r_state == TCPS_CLOSED) && (tp->t_state != TCPS_CLOSED)) { + rack->r_is_v6 = (tp->t_inpcb->inp_vflag & INP_IPV6) != 0; + } switch (tp->t_state) { case TCPS_SYN_SENT: rack->r_state = TCPS_SYN_SENT; @@ -16215,7 +16218,7 @@ rack_output(struct tcpcb *tp) } idle = 0; } - if (rack_use_fsb && (rack->r_fsb_inited == 0)) + if (rack_use_fsb && (rack->r_fsb_inited == 0) && (rack->r_state != TCPS_CLOSED)) rack_init_fsb_block(tp, rack); again: /* |