Changeset View
Changeset View
Standalone View
Standalone View
head/sys/net/if_vxlan.c
Show First 20 Lines • Show All 924 Lines • ▼ Show 20 Lines | vxlan_socket_init(struct vxlan_socket *vso, struct ifnet *ifp) | ||||
error = socreate(vso->vxlso_laddr.sa.sa_family, &vso->vxlso_sock, | error = socreate(vso->vxlso_laddr.sa.sa_family, &vso->vxlso_sock, | ||||
SOCK_DGRAM, IPPROTO_UDP, td->td_ucred, td); | SOCK_DGRAM, IPPROTO_UDP, td->td_ucred, td); | ||||
if (error) { | if (error) { | ||||
if_printf(ifp, "cannot create socket: %d\n", error); | if_printf(ifp, "cannot create socket: %d\n", error); | ||||
return (error); | return (error); | ||||
} | } | ||||
error = udp_set_kernel_tunneling(vso->vxlso_sock, | error = udp_set_kernel_tunneling(vso->vxlso_sock, | ||||
vxlan_rcv_udp_packet, vso); | vxlan_rcv_udp_packet, NULL, vso); | ||||
if (error) { | if (error) { | ||||
if_printf(ifp, "cannot set tunneling function: %d\n", error); | if_printf(ifp, "cannot set tunneling function: %d\n", error); | ||||
return (error); | return (error); | ||||
} | } | ||||
if (vxlan_reuse_port != 0) { | if (vxlan_reuse_port != 0) { | ||||
struct sockopt sopt; | struct sockopt sopt; | ||||
int val = 1; | int val = 1; | ||||
▲ Show 20 Lines • Show All 2,149 Lines • Show Last 20 Lines |