Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_vxlan.c
Show First 20 Lines • Show All 2,774 Lines • ▼ Show 20 Lines | vxlan_rcv_udp_packet(struct mbuf *m, int offset, struct inpcb *inpcb, | ||||
* a bit set may indicate an unsupported new feature. This matches | * a bit set may indicate an unsupported new feature. This matches | ||||
* the behavior of the Linux implementation. | * the behavior of the Linux implementation. | ||||
*/ | */ | ||||
if (vxh->vxlh_flags != htonl(VXLAN_HDR_FLAGS_VALID_VNI) || | if (vxh->vxlh_flags != htonl(VXLAN_HDR_FLAGS_VALID_VNI) || | ||||
vxh->vxlh_vni & ~VXLAN_VNI_MASK) | vxh->vxlh_vni & ~VXLAN_VNI_MASK) | ||||
goto out; | goto out; | ||||
vni = ntohl(vxh->vxlh_vni) >> VXLAN_HDR_VNI_SHIFT; | vni = ntohl(vxh->vxlh_vni) >> VXLAN_HDR_VNI_SHIFT; | ||||
/* Adjust to the start of the inner Ethernet frame. */ | /* Adjust to the start of the inner Ethernet frame. */ | ||||
m_adj(m, offset + sizeof(struct vxlan_header)); | m_adj_decap(m, offset + sizeof(struct vxlan_header)); | ||||
error = vxlan_input(vso, vni, &m, srcsa); | error = vxlan_input(vso, vni, &m, srcsa); | ||||
MPASS(error != 0 || m == NULL); | MPASS(error != 0 || m == NULL); | ||||
out: | out: | ||||
if (m != NULL) | if (m != NULL) | ||||
m_freem(m); | m_freem(m); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 848 Lines • Show Last 20 Lines |