diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-10-05 11:45:27 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-10-05 11:45:27 +0000 |
commit | dcc5670814adfc45ef943ca20caa730ff62f9ebe (patch) | |
tree | b4e1ca3fc24e192e13e47e2fcf3352193af93065 /sys/netinet/ipsec_output.c | |
parent | f4a8b05dcc16eba91428415b1e4c8f9ae542770c (diff) |
Cleanup the error handling in ipsec ipip_output() and consistently
goto drop instead of return. An ENOBUFS should be EINVAL in IPv6
case. Also use combined packet and byte counter.
OK sthen@ dlg@
Diffstat (limited to 'sys/netinet/ipsec_output.c')
-rw-r--r-- | sys/netinet/ipsec_output.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netinet/ipsec_output.c b/sys/netinet/ipsec_output.c index 9fb432a7c25..3792d7f65fb 100644 --- a/sys/netinet/ipsec_output.c +++ b/sys/netinet/ipsec_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsec_output.c,v 1.86 2021/07/27 17:13:03 mvs Exp $ */ +/* $OpenBSD: ipsec_output.c,v 1.87 2021/10/05 11:45:26 bluhm Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) * @@ -583,8 +583,7 @@ ipsp_process_done(struct mbuf *m, struct tdb *tdb) m_tag_prepend(m, mtag); - ipsecstat_inc(ipsec_opackets); - ipsecstat_add(ipsec_obytes, m->m_pkthdr.len); + ipsecstat_pkt(ipsec_opackets, ipsec_obytes, m->m_pkthdr.len); tdb->tdb_opackets++; tdb->tdb_obytes += m->m_pkthdr.len; |