Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Oct 2018 11:26:15 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339219 - head/sys/netinet
Message-ID:  <201810071126.w97BQFAB030295@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sun Oct  7 11:26:15 2018
New Revision: 339219
URL: https://svnweb.freebsd.org/changeset/base/339219

Log:
  Ensure that the ips_localout counter is incremented for
  locally generated SCTP packets sent over IPv4. This make
  the behaviour consistent with IPv6.
  
  Reviewed by:		ae@, bz@, jtl@
  Approved by:		re (kib@)
  MFC after:		1 week
  Differential Revision:	https://reviews.freebsd.org/D17406

Modified:
  head/sys/netinet/ip_output.c

Modified: head/sys/netinet/ip_output.c
==============================================================================
--- head/sys/netinet/ip_output.c	Sun Oct  7 01:53:43 2018	(r339218)
+++ head/sys/netinet/ip_output.c	Sun Oct  7 11:26:15 2018	(r339219)
@@ -262,11 +262,12 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct rou
 		ip->ip_v = IPVERSION;
 		ip->ip_hl = hlen >> 2;
 		ip_fillid(ip);
-		IPSTAT_INC(ips_localout);
 	} else {
 		/* Header already set, fetch hlen from there */
 		hlen = ip->ip_hl << 2;
 	}
+	if ((flags & IP_FORWARDING) == 0)
+		IPSTAT_INC(ips_localout);
 
 	/*
 	 * dst/gw handling:



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