Author: tuexen
Date: Wed Mar  4 16:41:25 2020
New Revision: 358621
URL: https://svnweb.freebsd.org/changeset/base/358621

Log:
  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.
  
  Reviewed by:          bz@
  MFC after:            3 days
  Sponsored by:         Netflix, Inc.
  Differential Revision:        https://reviews.freebsd.org/D23957

Modified:
  head/sys/netinet/tcp_syncache.c

Modified: head/sys/netinet/tcp_syncache.c
==============================================================================
--- head/sys/netinet/tcp_syncache.c     Wed Mar  4 16:20:59 2020        
(r358620)
+++ head/sys/netinet/tcp_syncache.c     Wed Mar  4 16:41:25 2020        
(r358621)
@@ -2224,7 +2224,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"

Reply via email to