Author: tuexen Date: Thu Sep 10 13:15:17 2020 New Revision: 365570 URL: https://svnweb.freebsd.org/changeset/base/365570
Log: MFC r358621: When using automatically generated flow labels and using TCP SYN cookies, use the same flow label for the segments sent during the handshake and after the handshake. This fixes a bug by making sure that sc_flowlabel is always stored in network byte order. Modified: stable/12/sys/netinet/tcp_syncache.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/tcp_syncache.c ============================================================================== --- stable/12/sys/netinet/tcp_syncache.c Thu Sep 10 12:54:46 2020 (r365569) +++ stable/12/sys/netinet/tcp_syncache.c Thu Sep 10 13:15:17 2020 (r365570) @@ -2161,7 +2161,8 @@ syncookie_lookup(struct in_conninfo *inc, struct synca #ifdef INET6 case INC_ISIPV6: if (sotoinpcb(lso)->inp_flags & IN6P_AUTOFLOWLABEL) - sc->sc_flowlabel = sc->sc_iss & IPV6_FLOWLABEL_MASK; + sc->sc_flowlabel = + htonl(sc->sc_iss) & IPV6_FLOWLABEL_MASK; break; #endif } _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"