Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_gif.c
Show First 20 Lines • Show All 534 Lines • ▼ Show 20 Lines | case AF_LINK: | ||||
if (m == NULL) | if (m == NULL) | ||||
goto drop; | goto drop; | ||||
eip = mtod(m, struct etherip_header *); | eip = mtod(m, struct etherip_header *); | ||||
if (eip->eip_ver != ETHERIP_VERSION) { | if (eip->eip_ver != ETHERIP_VERSION) { | ||||
/* discard unknown versions */ | /* discard unknown versions */ | ||||
m_freem(m); | m_freem(m); | ||||
goto drop; | goto drop; | ||||
} | } | ||||
m_adj(m, sizeof(struct etherip_header)); | |||||
m_adj_decap(m, sizeof(struct etherip_header)); | |||||
m->m_flags &= ~(M_BCAST|M_MCAST); | m->m_flags &= ~(M_BCAST|M_MCAST); | ||||
m->m_pkthdr.rcvif = ifp; | m->m_pkthdr.rcvif = ifp; | ||||
if (ifp->if_bridge) { | if (ifp->if_bridge) { | ||||
oldifp = ifp; | oldifp = ifp; | ||||
eh = mtod(m, struct ether_header *); | eh = mtod(m, struct ether_header *); | ||||
if (ETHER_IS_MULTICAST(eh->ether_dhost)) { | if (ETHER_IS_MULTICAST(eh->ether_dhost)) { | ||||
▲ Show 20 Lines • Show All 171 Lines • Show Last 20 Lines |