From f3c93842bf59a2b93db9cf53446a620aee19576a Mon Sep 17 00:00:00 2001 From: "Andrey V. Elsukov" Date: Wed, 12 Nov 2014 14:00:49 +0000 Subject: [PATCH] Fix ips_out_nosa errors accounting. MFC after: 1 week Sponsored by: Yandex LLC --- sys/netipsec/ipsec_output.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c index 1f03196453d9..83735b02f2b4 100644 --- a/sys/netipsec/ipsec_output.c +++ b/sys/netipsec/ipsec_output.c @@ -358,7 +358,16 @@ ipsec_nextisr( * this packet because it is responsibility for * upper layer to retransmit the packet. */ - IPSECSTAT_INC(ips_out_nosa); + switch(af) { + case AF_INET: + IPSECSTAT_INC(ips_out_nosa); + break; +#ifdef INET6 + case AF_INET6: + IPSEC6STAT_INC(ips_out_nosa); + break; +#endif + } goto bad; } sav = isr->sav;