From 0d76751fad7739014485ba5bd388d4f1b4fd4143 Mon Sep 17 00:00:00 2001 From: James Chapman Date: Fri, 2 Apr 2010 06:19:00 +0000 Subject: l2tp: Add L2TPv3 IP encapsulation (no UDP) support This patch adds a new L2TPIP socket family and modifies the core to handle the case where there is no UDP header in the L2TP packet. L2TP/IP uses IP protocol 115. Since L2TP/UDP and L2TP/IP packets differ in layout, the datapath packet handling code needs changes too. Userspace uses an L2TPIP socket instead of a UDP socket when IP encapsulation is required. We can't use raw sockets for this because the semantics of raw sockets don't lend themselves to the socket-per-tunnel model - we need to Signed-off-by: David S. Miller --- net/l2tp/l2tp_core.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'net/l2tp/l2tp_core.h') diff --git a/net/l2tp/l2tp_core.h b/net/l2tp/l2tp_core.h index 5c53eb2a8ad9..d2395984645e 100644 --- a/net/l2tp/l2tp_core.h +++ b/net/l2tp/l2tp_core.h @@ -48,6 +48,11 @@ enum l2tp_l2spec_type { L2TP_L2SPECTYPE_DEFAULT, }; +enum l2tp_encap_type { + L2TP_ENCAPTYPE_UDP, + L2TP_ENCAPTYPE_IP, +}; + struct sk_buff; struct l2tp_stats { @@ -155,6 +160,7 @@ struct l2tp_session { struct l2tp_tunnel_cfg { int debug; /* bitmask of debug message * categories */ + enum l2tp_encap_type encap; }; struct l2tp_tunnel { @@ -170,6 +176,7 @@ struct l2tp_tunnel { char name[20]; /* for logging */ int debug; /* bitmask of debug message * categories */ + enum l2tp_encap_type encap; struct l2tp_stats stats; struct list_head list; /* Keep a list of all tunnels */ -- cgit v1.2.3