sync with OpenBSD -current
This commit is contained in:
parent
505632e9be
commit
72a51d0b15
41 changed files with 3131 additions and 1347 deletions
15
sys/net/if.c
15
sys/net/if.c
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if.c,v 1.713 2023/12/23 10:52:54 bluhm Exp $ */
|
||||
/* $OpenBSD: if.c,v 1.714 2023/12/29 11:43:04 bluhm Exp $ */
|
||||
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -839,11 +839,14 @@ if_input_local(struct ifnet *ifp, struct mbuf *m, sa_family_t af)
|
|||
if (ISSET(keepcksum, M_ICMP_CSUM_OUT))
|
||||
m->m_pkthdr.csum_flags |= M_ICMP_CSUM_IN_OK;
|
||||
|
||||
ifp->if_opackets++;
|
||||
ifp->if_obytes += m->m_pkthdr.len;
|
||||
|
||||
ifp->if_ipackets++;
|
||||
ifp->if_ibytes += m->m_pkthdr.len;
|
||||
if (ifp->if_counters == NULL) {
|
||||
/* XXXSMP multicast loopback and simplex interfaces */
|
||||
ifp->if_opackets++;
|
||||
ifp->if_obytes += m->m_pkthdr.len;
|
||||
} else {
|
||||
counters_pkt(ifp->if_counters, ifc_opackets, ifc_obytes,
|
||||
m->m_pkthdr.len);
|
||||
}
|
||||
|
||||
switch (af) {
|
||||
case AF_INET:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_loop.c,v 1.97 2023/07/21 22:24:41 bluhm Exp $ */
|
||||
/* $OpenBSD: if_loop.c,v 1.98 2023/12/29 11:43:04 bluhm Exp $ */
|
||||
/* $NetBSD: if_loop.c,v 1.15 1996/05/07 02:40:33 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -185,6 +185,7 @@ loop_clone_create(struct if_clone *ifc, int unit)
|
|||
ifp->if_output = looutput;
|
||||
ifp->if_type = IFT_LOOP;
|
||||
ifp->if_hdrlen = sizeof(u_int32_t);
|
||||
if_counters_alloc(ifp);
|
||||
if (unit == 0) {
|
||||
if_attachhead(ifp);
|
||||
if_addgroup(ifp, ifc->ifc_name);
|
||||
|
@ -250,7 +251,7 @@ loinput(struct ifnet *ifp, struct mbuf *m)
|
|||
|
||||
error = if_input_local(ifp, m, m->m_pkthdr.ph_family);
|
||||
if (error)
|
||||
ifp->if_ierrors++;
|
||||
counters_inc(ifp->if_counters, ifc_ierrors);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue