]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/net/if_pflog.c
xnu-1699.22.81.tar.gz
[apple/xnu.git] / bsd / net / if_pflog.c
index 8e7480911edb4270ee40f4e2e7ccc9a21a150327..ae2f9254cef736d9504a64d60701bd16f56e4630 100644 (file)
@@ -68,6 +68,7 @@
 #include <sys/proc_internal.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
+#include <sys/mcache.h>
 
 #include <net/if.h>
 #include <net/if_var.h>
@@ -344,8 +345,8 @@ pflog_packet(struct pfi_kif *kif, struct mbuf *m, sa_family_t af, u_int8_t dir,
        }
 #endif /* INET */
 
-       ifn->if_opackets++;
-       ifn->if_obytes += m->m_pkthdr.len;
+       atomic_add_64(&ifn->if_opackets, 1);
+       atomic_add_64(&ifn->if_obytes, m->m_pkthdr.len);
 
        switch (dir) {
        case PF_IN: