Changeset View
Changeset View
Standalone View
Standalone View
sys/netgraph/ng_iface.c
Show First 20 Lines • Show All 365 Lines • ▼ Show 20 Lines | if (error) { | ||||
m_freem(m); | m_freem(m); | ||||
return (error); | return (error); | ||||
} | } | ||||
/* BPF writes need to be handled specially. */ | /* BPF writes need to be handled specially. */ | ||||
if (dst->sa_family == AF_UNSPEC) | if (dst->sa_family == AF_UNSPEC) | ||||
bcopy(dst->sa_data, &af, sizeof(af)); | bcopy(dst->sa_data, &af, sizeof(af)); | ||||
else | else | ||||
af = dst->sa_family; | af = RO_GET_FAMILY(ro, dst); | ||||
melifaro: Do we need it? | |||||
Done Inline ActionsI think it is the same as above of sys/net/if_tuntap.c zlei: I think it is the same as above of `sys/net/if_tuntap.c` | |||||
/* Berkeley packet filter */ | /* Berkeley packet filter */ | ||||
ng_iface_bpftap(ifp, m, af); | ng_iface_bpftap(ifp, m, af); | ||||
if (ALTQ_IS_ENABLED(&ifp->if_snd)) { | if (ALTQ_IS_ENABLED(&ifp->if_snd)) { | ||||
M_PREPEND(m, sizeof(sa_family_t), M_NOWAIT); | M_PREPEND(m, sizeof(sa_family_t), M_NOWAIT); | ||||
if (m == NULL) { | if (m == NULL) { | ||||
if_inc_counter(ifp, IFCOUNTER_OQDROPS, 1); | if_inc_counter(ifp, IFCOUNTER_OQDROPS, 1); | ||||
▲ Show 20 Lines • Show All 436 Lines • Show Last 20 Lines |
Do we need it?