When using "netstat -s", the command output two sections for IPSec : one for ipv4 ipsec and one for ipv6 ipsec : ipsec: 0 inbound packets violated process security policy 0 inbound packets failed due to insufficient memory 0 invalid inbound packets 0 outbound packets violated process security policy 0 outbound packets with no SA available 0 outbound packets failed due to insufficient memory 0 outbound packets with no route available 0 invalid outbound packets 0 outbound packets with bundled SAs 0 spd cache hits 0 spd cache misses 0 clusters copied during clone 0 mbufs inserted during makespace ipsec6: 0 inbound packets violated process security policy 0 inbound packets failed due to insufficient memory 0 invalid inbound packets 0 outbound packets violated process security policy 0 outbound packets with no SA available 0 outbound packets failed due to insufficient memory 0 outbound packets with no route available 0 invalid outbound packets 0 outbound packets with bundled SAs 0 spd cache hits 0 spd cache misses 0 clusters copied during clone 0 mbufs inserted during makespace But when using "netstat -s --libxo json", the command ouput two "ipsec-statistics" sections : "ipsec-statistics":{ "dropped-policy-violation":0, "dropped-no-memory":0, "dropped-invalid":0, "discarded-policy-violation":0, "discarded-no-sa":0, "discarded-no-memory":0, "discarded-no-route":0, "discarded-invalid":0, "send-bundled-sa":0, "spdcache-hits":0, "spdcache-misses":0, "clusters-copied-during-clone":0, "mbufs-inserted":0 }, the second section should be "ipsec6-statistics"
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=ae4fb190fd4a21649c4562fc6cd81bba4da222a4 commit ae4fb190fd4a21649c4562fc6cd81bba4da222a4 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2021-10-05 09:42:58 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2021-10-05 09:42:58 +0000 netstat: split ipsec and ipsec6 statistics in libxo In particular fixes --libxo json PR: 254673 Reported by: j.vandeville@gmail.com Sponsored by: Rubicon Communications, LLC ("Netgate") usr.bin/netstat/ipsec.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)