Changeset View
Changeset View
Standalone View
Standalone View
sys/net/raw_usrreq.c
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | if (rp->rcb_proto.sp_protocol && | ||||
continue; | continue; | ||||
if (cb != NULL && (*cb)(m, proto, src, rp) != 0) | if (cb != NULL && (*cb)(m, proto, src, rp) != 0) | ||||
continue; | continue; | ||||
if (last) { | if (last) { | ||||
struct mbuf *n; | struct mbuf *n; | ||||
n = m_copym(m, 0, M_COPYALL, M_NOWAIT); | n = m_copym(m, 0, M_COPYALL, M_NOWAIT); | ||||
if (n) { | if (n) { | ||||
if (sbappendaddr(&last->so_rcv, src, | if (sbappendaddr(&last->so_rcv, src, | ||||
n, (struct mbuf *)0) == 0) | n, (struct mbuf *)0) == 0) { | ||||
/* should notify about lost packet */ | soroverflow(last); | ||||
m_freem(n); | m_freem(n); | ||||
else | } else | ||||
sorwakeup(last); | sorwakeup(last); | ||||
} | } | ||||
} | } | ||||
last = rp->rcb_socket; | last = rp->rcb_socket; | ||||
} | } | ||||
if (last) { | if (last) { | ||||
if (sbappendaddr(&last->so_rcv, src, | if (sbappendaddr(&last->so_rcv, src, | ||||
m, (struct mbuf *)0) == 0) | m, (struct mbuf *)0) == 0) { | ||||
soroverflow(last); | |||||
m_freem(m); | m_freem(m); | ||||
else | } else | ||||
sorwakeup(last); | sorwakeup(last); | ||||
} else | } else | ||||
m_freem(m); | m_freem(m); | ||||
mtx_unlock(&rawcb_mtx); | mtx_unlock(&rawcb_mtx); | ||||
} | } | ||||
/*ARGSUSED*/ | /*ARGSUSED*/ | ||||
void | void | ||||
▲ Show 20 Lines • Show All 153 Lines • Show Last 20 Lines |