summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2010-09-23 04:45:16 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2010-09-23 04:45:16 +0000
commitc7968146c8a68c46d389c2093c34be7f7ec8a3e1 (patch)
tree16b570f74f73fbe01a1ebeb26982f7ad02dbda8c /sys/netinet6
parent94ea592b142bfc79f7c619f24981de85993897dc (diff)
add a new IP level socket option IP_PIPEX. This option is used for L2TP
support by pipex. OK henning@, "Carry on" blambert@
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/in6.h3
-rw-r--r--sys/netinet6/ip6_output.c13
2 files changed, 14 insertions, 2 deletions
diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h
index e70268deed1..79e3d236a3b 100644
--- a/sys/netinet6/in6.h
+++ b/sys/netinet6/in6.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.h,v 1.51 2010/07/08 19:42:46 jsg Exp $ */
+/* $OpenBSD: in6.h,v 1.52 2010/09/23 04:45:15 yasuoka Exp $ */
/* $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ */
/*
@@ -477,6 +477,7 @@ struct route_in6 {
#define IPV6_TCLASS 61 /* int; send traffic class value */
#define IPV6_DONTFRAG 62 /* bool; disable IPv6 fragmentation */
+#define IPV6_PIPEX 63 /* bool; using PIPEX */
/* to define items, should talk with KAME guys first, for *BSD compatibility */
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index f1bc7e51827..0c1a2bbccf6 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_output.c,v 1.117 2010/08/07 03:50:02 krw Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.118 2010/09/23 04:45:15 yasuoka Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -1709,6 +1709,12 @@ do { \
inp->inp_secrequire = get_sa_require(inp);
#endif
break;
+ case IPV6_PIPEX:
+ if (m != NULL && m->m_len == sizeof(int))
+ inp->inp_pipex = *mtod(m, int *);
+ else
+ error = EINVAL;
+ break;
default:
error = ENOPROTOOPT;
@@ -1954,6 +1960,11 @@ do { \
*mtod(m, int *) = optval;
#endif
break;
+ case IPV6_PIPEX:
+ *mp = m = m_get(M_WAIT, MT_SOOPTS);
+ m->m_len = sizeof(int);
+ *mtod(m, int *) = optval;
+ break;
default:
error = ENOPROTOOPT;