Page MenuHomeFreeBSD

Fix ips_localout counter for SCTP
ClosedPublic

Authored by tuexen on Oct 4 2018, 1:41 PM.
Tags
None
Referenced Files
F174212279: D17406.id48716.diff
Thu, Oct 1, 9:57 AM
F174150914: D17406.id48716.diff
Wed, Sep 30, 11:10 PM
F174150820: D17406.id48850.diff
Wed, Sep 30, 11:09 PM
F174136890: D17406.diff
Wed, Sep 30, 8:39 PM
Unknown Object (File)
Tue, Sep 29, 2:38 AM
Unknown Object (File)
Wed, Sep 23, 11:32 PM
Unknown Object (File)
Fri, Sep 11, 11:32 AM
Unknown Object (File)
Wed, Sep 9, 8:25 PM
Subscribers

Details

Summary

When sending SCTP packets, the SCTP stack provides an IPv4 or IPv6 header when calling ip_output() or ipv6_output(). Currently, the IPv4 stack does not count these packets using the ips_localout counter whereas the IPv6 stack does count them correctly in the ip6s_localout counter.

This patch ensures that packets sent via IPv4 with an IPv4 header provided by the caller of ip_output() are counted in the ips_localout counter.

Test Plan

Run an SCTP capable test program on the loopback interface and watch the counter using systat -ip.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Looking at the how IP_FORWARDING flag is used, I think gif/gre/me interfaces should not use this flag. What you think?

This revision is now accepted and ready to land.Oct 4 2018, 2:00 PM
This revision was automatically updated to reflect the committed changes.
In D17406#371337, @ae wrote:

Looking at the how IP_FORWARDING flag is used, I think gif/gre/me interfaces should not use this flag. What you think?

Need to look into this. Will report in the next days.