-/* $OpenBSD: if.c,v 1.715 2024/01/06 10:58:45 bluhm Exp $ */
+/* $OpenBSD: if.c,v 1.716 2024/01/06 11:42:11 bluhm Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
if (ISSET(keepcksum, M_ICMP_CSUM_OUT))
m->m_pkthdr.csum_flags |= M_ICMP_CSUM_IN_OK;
- if (ifp->if_counters == NULL) {
- /* XXXSMP multicast loopback and simplex interfaces */
- ifp->if_opackets++;
- ifp->if_obytes += m->m_pkthdr.len;
- } else {
+ /* do not count multicast loopback and simplex interfaces */
+ if (ISSET(ifp->if_flags, IFF_LOOPBACK)) {
counters_pkt(ifp->if_counters, ifc_opackets, ifc_obytes,
m->m_pkthdr.len);
}