Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Mar 2020 14:48:22 +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-12@freebsd.org
Subject:   svn commit: r358739 - stable/12/sys/netinet
Message-ID:  <202003081448.028EmMmn073582@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sun Mar  8 14:48:21 2020
New Revision: 358739
URL: https://svnweb.freebsd.org/changeset/base/358739

Log:
  MFC r358614:
  
  Don't send an uninitialised traffic class in the IPv6 header, when
  sending a TCP segment from the TCP SYN cache (like a SYN-ACK).
  This fix initialises it to zero. This is correct for the ECN bits,
  but is does not honor the DSCP what an application might have set via
  the IPPROTO_IPV6 level socket options IPV6_TCLASS. That will be
  fixed separately.
  
  Reviewed by:		Richard Scheffenegger
  Sponsored by:		Netflix, Inc.
  Differential Revision:	https://reviews.freebsd.org/D23900

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	Sun Mar  8 13:24:34 2020	(r358738)
+++ stable/12/sys/netinet/tcp_syncache.c	Sun Mar  8 14:48:21 2020	(r358739)
@@ -1728,7 +1728,8 @@ syncache_respond(struct syncache *sc, struct syncache_
 		ip6->ip6_dst = sc->sc_inc.inc6_faddr;
 		ip6->ip6_plen = htons(tlen - hlen);
 		/* ip6_hlim is set after checksum */
-		ip6->ip6_flow &= ~IPV6_FLOWLABEL_MASK;
+		/* Zero out traffic class and flow label. */
+		ip6->ip6_flow &= ~IPV6_FLOWINFO_MASK;
 		ip6->ip6_flow |= sc->sc_flowlabel;
 
 		th = (struct tcphdr *)(ip6 + 1);



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