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
This commit is contained in:
Michael Tuexen 2018-10-07 11:26:15 +00:00
parent 532dc17243
commit 3924dfa721
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=339219

View file

@ -262,11 +262,12 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags,
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: