diff options
Diffstat (limited to 'sys/netipsec/ipsec_output.c')
-rw-r--r-- | sys/netipsec/ipsec_output.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c index 8566bb4..1f03196 100644 --- a/sys/netipsec/ipsec_output.c +++ b/sys/netipsec/ipsec_output.c @@ -441,8 +441,8 @@ ipsec4_process_packet( sav = isr->sav; #ifdef DEV_ENC - encif->if_opackets++; - encif->if_obytes += m->m_pkthdr.len; + if_inc_counter(encif, IFCOUNTER_OPACKETS, 1); + if_inc_counter(encif, IFCOUNTER_OBYTES, m->m_pkthdr.len); /* pass the mbuf to enc0 for bpf processing */ ipsec_bpf(m, sav, AF_INET, ENC_OUT|ENC_BEFORE); @@ -641,8 +641,8 @@ ipsec6_process_packet( dst = &sav->sah->saidx.dst; #ifdef DEV_ENC - encif->if_opackets++; - encif->if_obytes += m->m_pkthdr.len; + if_inc_counter(encif, IFCOUNTER_OPACKETS, 1); + if_inc_counter(encif, IFCOUNTER_OBYTES, m->m_pkthdr.len); /* pass the mbuf to enc0 for bpf processing */ ipsec_bpf(m, isr->sav, AF_INET6, ENC_OUT|ENC_BEFORE); |