diff options
author | cmetz <cmetz@cvs.openbsd.org> | 1999-07-06 20:17:54 +0000 |
---|---|---|
committer | cmetz <cmetz@cvs.openbsd.org> | 1999-07-06 20:17:54 +0000 |
commit | b572bd87e759146844b72e7a327306a471ae69c7 (patch) | |
tree | 3e21a6f1fca265ba2767f46b76bfd8d2182243b9 /sys/net | |
parent | 1b325370253fe0a5d55ea7f66f9477a75800daaf (diff) |
Added support for TCP MD5 option (RFC 2385).
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/pfkeyv2.c | 25 | ||||
-rw-r--r-- | sys/net/pfkeyv2.h | 23 |
2 files changed, 37 insertions, 11 deletions
diff --git a/sys/net/pfkeyv2.c b/sys/net/pfkeyv2.c index f9aed42b41c..46b84dc1b5e 100644 --- a/sys/net/pfkeyv2.c +++ b/sys/net/pfkeyv2.c @@ -774,6 +774,12 @@ pfkeyv2_send(struct socket *socket, void *message, int len) sa.tdb_sproto = IPPROTO_IPIP; break; +#ifdef TCP_SIGNATURE + case SADB_X_SATYPE_TCPSIGNATURE: + sa.tdb_sproto = IPPROTO_TCP; + break; +#endif /* TCP_SIGNATURE */ + default: /* Nothing else supported */ rval = EOPNOTSUPP; goto ret; @@ -861,6 +867,13 @@ pfkeyv2_send(struct socket *socket, void *message, int len) newsa->tdb_sproto = IPPROTO_IPIP; alg = XF_IP4; break; + +#ifdef TCP_SIGNATURE + case SADB_X_SATYPE_TCPSIGNATURE: + newsa->tdb_sproto = IPPROTO_TCP; + alg = XF_TCPSIGNATURE; + break; +#endif /* TCP_SIGNATURE */ default: /* Nothing else supported */ rval = EOPNOTSUPP; @@ -988,6 +1001,13 @@ pfkeyv2_send(struct socket *socket, void *message, int len) alg = XF_IP4; break; +#ifdef TCP_SIGNATURE + case SADB_X_SATYPE_TCPSIGNATURE: + newsa->tdb_sproto = IPPROTO_TCP; + alg = XF_TCPSIGNATURE; + break; +#endif /* TCP_SIGNATURE */ + default: /* Nothing else supported */ rval = EOPNOTSUPP; goto splxret; @@ -1757,6 +1777,11 @@ pfkeyv2_expire(struct tdb *sa, u_int16_t type) case IPPROTO_IPIP: satype = SADB_X_SATYPE_IPIP; break; +#ifdef TCP_SIGNATURE + case IPPROTO_TCP: + satype = SADB_X_SATYPE_TCPSIGNATURE; + break; +#endif /* TCP_SIGNATURE */ default: rval = EOPNOTSUPP; goto ret; diff --git a/sys/net/pfkeyv2.h b/sys/net/pfkeyv2.h index 36f22763df6..1a7f52d0d5b 100644 --- a/sys/net/pfkeyv2.h +++ b/sys/net/pfkeyv2.h @@ -191,17 +191,18 @@ struct sadb_protocol { #define SADB_EXT_MAX 22 /* Fix pfkeyv2.c struct pfkeyv2_socket if SATYPE_MAX > 31 */ -#define SADB_SATYPE_UNSPEC 0 -#define SADB_SATYPE_AH 1 -#define SADB_SATYPE_ESP 2 -#define SADB_SATYPE_RSVP 3 -#define SADB_SATYPE_OSPFV2 4 -#define SADB_SATYPE_RIPV2 5 -#define SADB_SATYPE_MIP 6 -#define SADB_X_SATYPE_AH_OLD 7 -#define SADB_X_SATYPE_ESP_OLD 8 -#define SADB_X_SATYPE_IPIP 9 -#define SADB_SATYPE_MAX 9 +#define SADB_SATYPE_UNSPEC 0 +#define SADB_SATYPE_AH 1 +#define SADB_SATYPE_ESP 2 +#define SADB_SATYPE_RSVP 3 +#define SADB_SATYPE_OSPFV2 4 +#define SADB_SATYPE_RIPV2 5 +#define SADB_SATYPE_MIP 6 +#define SADB_X_SATYPE_AH_OLD 7 +#define SADB_X_SATYPE_ESP_OLD 8 +#define SADB_X_SATYPE_IPIP 9 +#define SADB_X_SATYPE_TCPSIGNATURE 10 +#define SADB_SATYPE_MAX 10 #define SADB_SASTATE_LARVAL 0 #define SADB_SASTATE_MATURE 1 |