diff options
author | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2010-09-23 04:45:16 +0000 |
---|---|---|
committer | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2010-09-23 04:45:16 +0000 |
commit | c7968146c8a68c46d389c2093c34be7f7ec8a3e1 (patch) | |
tree | 16b570f74f73fbe01a1ebeb26982f7ad02dbda8c /sys/netinet6/ip6_output.c | |
parent | 94ea592b142bfc79f7c619f24981de85993897dc (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/ip6_output.c')
-rw-r--r-- | sys/netinet6/ip6_output.c | 13 |
1 files changed, 12 insertions, 1 deletions
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; |