svn commit: r339219 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Sun Oct 7 11:26:16 UTC 2018
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:
More information about the svn-src-all
mailing list