Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Sep 2014 00:21:21 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r271292 - head/sys/netinet6
Message-ID:  <201409090021.s890LLit099068@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Tue Sep  9 00:21:21 2014
New Revision: 271292
URL: http://svnweb.freebsd.org/changeset/base/271292

Log:
  Add IP_NODEFAULTFLOWID awareness to ip6_output().
  
  Differential Revision:	https://reviews.freebsd.org/D527

Modified:
  head/sys/netinet6/ip6_output.c

Modified: head/sys/netinet6/ip6_output.c
==============================================================================
--- head/sys/netinet6/ip6_output.c	Tue Sep  9 00:19:02 2014	(r271291)
+++ head/sys/netinet6/ip6_output.c	Tue Sep  9 00:21:21 2014	(r271292)
@@ -227,6 +227,9 @@ in6_delayed_cksum(struct mbuf *m, uint32
  *
  * ifpp - XXX: just for statistics
  */
+/*
+ * XXX TODO: no flowid is assigned for outbound flows?
+ */
 int
 ip6_output(struct mbuf *m0, struct ip6_pktopts *opt,
     struct route_in6 *ro, int flags, struct ip6_moptions *im6o,
@@ -260,8 +263,14 @@ ip6_output(struct mbuf *m0, struct ip6_p
 		goto bad;
 	}
 
-	if (inp != NULL)
+	if (inp != NULL) {
 		M_SETFIB(m, inp->inp_inc.inc_fibnum);
+		if (((flags & IP_NODEFAULTFLOWID) == 0) &&
+		(inp->inp_flags & (INP_HW_FLOWID|INP_SW_FLOWID))) {
+			m->m_pkthdr.flowid = inp->inp_flowid;
+			m->m_flags |= M_FLOWID;
+		}
+	}
 
 	finaldst = ip6->ip6_dst;
 	bzero(&exthdrs, sizeof(exthdrs));



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