summaryrefslogtreecommitdiff
path: root/sys/net/pfkeyv2.c
diff options
context:
space:
mode:
authorcmetz <cmetz@cvs.openbsd.org>1999-07-06 20:17:54 +0000
committercmetz <cmetz@cvs.openbsd.org>1999-07-06 20:17:54 +0000
commitb572bd87e759146844b72e7a327306a471ae69c7 (patch)
tree3e21a6f1fca265ba2767f46b76bfd8d2182243b9 /sys/net/pfkeyv2.c
parent1b325370253fe0a5d55ea7f66f9477a75800daaf (diff)
Added support for TCP MD5 option (RFC 2385).
Diffstat (limited to 'sys/net/pfkeyv2.c')
-rw-r--r--sys/net/pfkeyv2.c25
1 files changed, 25 insertions, 0 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;