summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_ah_new.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-07-24 01:37:13 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-07-24 01:37:13 +0000
commita608e3ef9e8388d7e633fe045c68bcada8ee50e9 (patch)
tree2ec591206538043d149a2f71a87bbf9129e3fe8c /sys/netinet/ip_ah_new.c
parent6c93da90187eff356d28caeebed772c3df593006 (diff)
network byte order for counters
Diffstat (limited to 'sys/netinet/ip_ah_new.c')
-rw-r--r--sys/netinet/ip_ah_new.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_ah_new.c b/sys/netinet/ip_ah_new.c
index d28745db689..58c647faa08 100644
--- a/sys/netinet/ip_ah_new.c
+++ b/sys/netinet/ip_ah_new.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ah_new.c,v 1.4 1997/07/18 18:09:52 provos Exp $ */
+/* $OpenBSD: ip_ah_new.c,v 1.5 1997/07/24 01:37:10 deraadt Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
@@ -889,8 +889,8 @@ ah_new_output(struct mbuf *m, struct sockaddr_encap *gw, struct tdb *tdb,
/* Update the counters */
tdb->tdb_cur_packets++;
- tdb->tdb_cur_bytes += ip->ip_len - (ip->ip_hl << 2) - AH_NEW_FLENGTH;
- ahstat.ahs_obytes += ip->ip_len - (ip->ip_hl << 2) - AH_NEW_FLENGTH;
+ tdb->tdb_cur_bytes += ntohs(ip->ip_len) - (ip->ip_hl << 2) - AH_NEW_FLENGTH;
+ ahstat.ahs_obytes += ntohs(ip->ip_len) - (ip->ip_hl << 2) - AH_NEW_FLENGTH;
return 0;
}