Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 May 2020 03:29:19 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r360768 - stable/11/sys/netinet
Message-ID:  <202005070329.0473TJ8Z033787@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Thu May  7 03:29:18 2020
New Revision: 360768
URL: https://svnweb.freebsd.org/changeset/base/360768

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

Modified:
  stable/11/sys/netinet/tcp_syncache.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/tcp_syncache.c
==============================================================================
--- stable/11/sys/netinet/tcp_syncache.c	Thu May  7 03:27:10 2020	(r360767)
+++ stable/11/sys/netinet/tcp_syncache.c	Thu May  7 03:29:18 2020	(r360768)
@@ -2110,7 +2110,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
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005070329.0473TJ8Z033787>