freebsd-dev/sys/netipsec
bms 320d5d9482 Initial import of RFC 2385 (TCP-MD5) digest support.
This is the first of two commits; bringing in the kernel support first.
This can be enabled by compiling a kernel with options TCP_SIGNATURE
and FAST_IPSEC.

For the uninitiated, this is a TCP option which provides for a means of
authenticating TCP sessions which came into being before IPSEC. It is
still relevant today, however, as it is used by many commercial router
vendors, particularly with BGP, and as such has become a requirement for
interconnect at many major Internet points of presence.

Several parts of the TCP and IP headers, including the segment payload,
are digested with MD5, including a shared secret. The PF_KEY interface
is used to manage the secrets using security associations in the SADB.

There is a limitation here in that as there is no way to map a TCP flow
per-port back to an SPI without polluting tcpcb or using the SPD; the
code to do the latter is unstable at this time. Therefore this code only
supports per-host keying granularity.

Whilst FAST_IPSEC is mutually exclusive with KAME IPSEC (and thus IPv6),
TCP_SIGNATURE applies only to IPv4. For the vast majority of prospective
users of this feature, this will not pose any problem.

This implementation is output-only; that is, the option is honoured when
responding to a host initiating a TCP session, but no effort is made
[yet] to authenticate inbound traffic. This is, however, sufficient to
interwork with Cisco equipment.

Tested with a Cisco 2501 running IOS 12.0(27), and Quagga 0.96.4 with
local patches. Patches for tcpdump to validate TCP-MD5 sessions are also
available from me upon request.

Sponsored by:	sentex.net
2004-02-11 04:26:04 +00:00
..
ah_var.h
ah.h
esp_var.h
esp.h
ipcomp_var.h
ipcomp.h
ipip_var.h
ipsec6.h
ipsec_input.c MFp4: portability work, general cleanup, locking fixes 2003-09-29 22:57:43 +00:00
ipsec_mbuf.c Push m_apply() and m_getptr() up into the colleciton of standard mbuf 2003-12-15 21:49:41 +00:00
ipsec_osdep.h os dependency glue file for improving portability 2003-09-29 22:47:45 +00:00
ipsec_output.c Fix ipip_output() to always set *mp to NULL on failure, even if 'm' 2004-01-20 22:45:10 +00:00
ipsec.c o add missing break 2004-01-27 17:45:28 +00:00
ipsec.h Initial import of RFC 2385 (TCP-MD5) digest support. 2004-02-11 04:26:04 +00:00
key_debug.c MFp4: portability work, general cleanup, locking fixes 2003-09-29 22:57:43 +00:00
key_debug.h
key_var.h
key.c Initial import of RFC 2385 (TCP-MD5) digest support. 2004-02-11 04:26:04 +00:00
key.h Locking and misc cleanups; most of which I've been running for >4 months: 2003-09-01 05:35:55 +00:00
keydb.h MFp4: portability work, general cleanup, locking fixes 2003-09-29 22:57:43 +00:00
keysock.c Introduce a MAC label reference in 'struct inpcb', which caches 2003-11-18 00:39:07 +00:00
keysock.h
xform_ah.c MFp4: portability work, general cleanup, locking fixes 2003-09-29 22:57:43 +00:00
xform_esp.c change SYSINIT starting point to be consistent with other modules 2004-01-27 17:43:49 +00:00
xform_ipcomp.c change SYSINIT starting point to be consistent with other modules 2004-01-27 17:43:49 +00:00
xform_ipip.c Fix ipip_output() to always set *mp to NULL on failure, even if 'm' 2004-01-20 22:45:10 +00:00
xform.h