Commit 0a69452c authored by Diego Beltrami's avatar Diego Beltrami Committed by David S. Miller
Browse files

[XFRM]: BEET mode

This patch introduces the BEET mode (Bound End-to-End Tunnel) with as
specified by the ietf draft at the following link:

http://www.ietf.org/internet-drafts/draft-nikander-esp-beet-mode-06.txt



The patch provides only single family support (i.e. inner family =
outer family).

Signed-off-by: default avatarDiego Beltrami <diego.beltrami@gmail.com>
Signed-off-by: default avatarMiika Komu <miika@iki.fi>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarAbhinav Pathak <abhinav.pathak@hiit.fi>
Signed-off-by: default avatarJeff Ahrenholz <ahrenholz@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 80246ab3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ enum {

  IPPROTO_ESP = 50,            /* Encapsulation Security Payload protocol */
  IPPROTO_AH = 51,             /* Authentication Header protocol       */
  IPPROTO_BEETPH = 94,	       /* IP option pseudo header for BEET */
  IPPROTO_PIM    = 103,		/* Protocol Independent Multicast	*/

  IPPROTO_COMP   = 108,                /* Compression Header protocol */
+9 −0
Original line number Diff line number Diff line
@@ -80,6 +80,8 @@
#define	IPOPT_TS_TSANDADDR	1		/* timestamps and addresses */
#define	IPOPT_TS_PRESPEC	3		/* specified modules only */

#define IPV4_BEET_PHMAXLEN 8

struct iphdr {
#if defined(__LITTLE_ENDIAN_BITFIELD)
	__u8	ihl:4,
@@ -123,4 +125,11 @@ struct ip_comp_hdr {
	__be16 cpi;
};

struct ip_beet_phdr {
	__u8 nexthdr;
	__u8 hdrlen;
	__u8 padlen;
	__u8 reserved;
};

#endif	/* _LINUX_IP_H */
+2 −1
Original line number Diff line number Diff line
@@ -12,7 +12,8 @@
enum {
	IPSEC_MODE_ANY		= 0,	/* We do not support this for SA */
	IPSEC_MODE_TRANSPORT	= 1,
	IPSEC_MODE_TUNNEL	= 2
	IPSEC_MODE_TUNNEL	= 2,
	IPSEC_MODE_BEET         = 3
};

enum {
+2 −1
Original line number Diff line number Diff line
@@ -129,7 +129,8 @@ enum
#define XFRM_MODE_TUNNEL 1
#define XFRM_MODE_ROUTEOPTIMIZATION 2
#define XFRM_MODE_IN_TRIGGER 3
#define XFRM_MODE_MAX 4
#define XFRM_MODE_BEET 4
#define XFRM_MODE_MAX 5

/* Netlink configuration messages.  */
enum {
+9 −0
Original line number Diff line number Diff line
@@ -434,6 +434,15 @@ config INET_XFRM_MODE_TUNNEL

	  If unsure, say Y.

config INET_XFRM_MODE_BEET
	tristate "IP: IPsec BEET mode"
	default y
	select XFRM
	---help---
	  Support for IPsec BEET mode.

	  If unsure, say Y.

config INET_DIAG
	tristate "INET: socket monitoring interface"
	default y
Loading