aee793eec9
This GRE-in-UDP encapsulation allows the UDP source port field to be used as an entropy field for load-balancing of GRE traffic in transit networks. Also most of multiqueue network cards are able distribute incoming UDP datagrams to different NIC queues, while very little are able do this for GRE packets. When an administrator enables UDP encapsulation with command `ifconfig gre0 udpencap`, the driver creates kernel socket, that binds to tunnel source address and after udp_set_kernel_tunneling() starts receiving of all UDP packets destined to 4754 port. Each kernel socket maintains list of tunnels with different destination addresses. Thus when several tunnels use the same source address, they all handled by single socket. The IP[V6]_BINDANY socket option is used to be able bind socket to source address even if it is not yet available in the system. This may happen on system boot, when gre(4) interface is created before source address become available. The encapsulation and sending of packets is done directly from gre(4) into ip[6]_output() without using sockets. Reviewed by: eugen MFC after: 1 month Relnotes: yes Differential Revision: https://reviews.freebsd.org/D19921
13 lines
260 B
Makefile
13 lines
260 B
Makefile
# $FreeBSD$
|
|
|
|
SYSDIR?=${SRCTOP}/sys
|
|
.PATH: ${SYSDIR}/net ${SYSDIR}/netinet ${SYSDIR}/netinet6
|
|
.include "${SYSDIR}/conf/kern.opts.mk"
|
|
|
|
KMOD= if_gre
|
|
SRCS= if_gre.c opt_inet.h opt_inet6.h opt_rss.h
|
|
SRCS.INET= ip_gre.c
|
|
SRCS.INET6= ip6_gre.c
|
|
|
|
.include <bsd.kmod.mk>
|