Commit a32e0eec authored by Chris Elston's avatar Chris Elston Committed by David S. Miller

l2tp: introduce L2TPv3 IP encapsulation support for IPv6

L2TPv3 defines an IP encapsulation packet format where data is carried
directly over IP (no UDP). The kernel already has support for L2TP IP
encapsulation over IPv4 (l2tp_ip). This patch introduces support for
L2TP IP encapsulation over IPv6.

The implementation is derived from ipv6/raw and ipv4/l2tp_ip.
Signed-off-by: default avatarChris Elston <celston@katalix.com>
Signed-off-by: default avatarJames Chapman <jchapman@katalix.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a495f836
......@@ -11,6 +11,7 @@
#include <linux/socket.h>
#ifdef __KERNEL__
#include <linux/in.h>
#include <linux/in6.h>
#else
#include <netinet/in.h>
#endif
......@@ -39,6 +40,22 @@ struct sockaddr_l2tpip {
sizeof(__u32)];
};
/**
* struct sockaddr_l2tpip6 - the sockaddr structure for L2TP-over-IPv6 sockets
* @l2tp_family: address family number AF_L2TPIP.
* @l2tp_addr: protocol specific address information
* @l2tp_conn_id: connection id of tunnel
*/
struct sockaddr_l2tpip6 {
/* The first fields must match struct sockaddr_in6 */
__kernel_sa_family_t l2tp_family; /* AF_INET6 */
__be16 l2tp_unused; /* INET port number (unused) */
__be32 l2tp_flowinfo; /* IPv6 flow information */
struct in6_addr l2tp_addr; /* IPv6 address */
__u32 l2tp_scope_id; /* scope id (new in RFC2553) */
__u32 l2tp_conn_id; /* Connection ID of tunnel */
};
/*****************************************************************************
* NETLINK_GENERIC netlink family.
*****************************************************************************/
......
......@@ -10,3 +10,6 @@ obj-$(subst y,$(CONFIG_L2TP),$(CONFIG_L2TP_IP)) += l2tp_ip.o
obj-$(subst y,$(CONFIG_L2TP),$(CONFIG_L2TP_V3)) += l2tp_netlink.o
obj-$(subst y,$(CONFIG_L2TP),$(CONFIG_L2TP_ETH)) += l2tp_eth.o
obj-$(subst y,$(CONFIG_L2TP),$(CONFIG_L2TP_DEBUGFS)) += l2tp_debugfs.o
ifneq ($(CONFIG_IPV6),)
obj-$(subst y,$(CONFIG_L2TP),$(CONFIG_L2TP_IP)) += l2tp_ip6.o
endif
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment