The branch main has been updated by rrs:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=66aec14a5391bda1e9a20f5e4381626797c3e0fb

commit 66aec14a5391bda1e9a20f5e4381626797c3e0fb
Author:     Randall Stewart <[email protected]>
AuthorDate: 2021-06-24 18:42:21 +0000
Commit:     Randall Stewart <[email protected]>
CommitDate: 2021-06-24 18:42:21 +0000

    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
---
 sys/netinet/tcp_stacks/rack.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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:
        /*
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to