diff options
author | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2005-08-08 09:15:10 +0000 |
---|---|---|
committer | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2005-08-08 09:15:10 +0000 |
commit | 6c28c8a324a71c55a562e7a02f11c5f282ad80d4 (patch) | |
tree | 73171e213cf3d31f645896e501f80543694fec67 /sbin/ipsecctl/pfkey.c | |
parent | 1ed298baad8fd9e46b82688df22bd56e4cd21ae2 (diff) |
prepare for static keying
Diffstat (limited to 'sbin/ipsecctl/pfkey.c')
-rw-r--r-- | sbin/ipsecctl/pfkey.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sbin/ipsecctl/pfkey.c b/sbin/ipsecctl/pfkey.c index 2a4b0314b75..b78d364620f 100644 --- a/sbin/ipsecctl/pfkey.c +++ b/sbin/ipsecctl/pfkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkey.c,v 1.19 2005/08/05 14:39:02 hshoexer Exp $ */ +/* $OpenBSD: pfkey.c,v 1.20 2005/08/08 09:15:09 hshoexer Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> * Copyright (c) 2003, 2004 Markus Friedl <markus@openbsd.org> @@ -758,7 +758,13 @@ pfkey_ipsec_establish(int action, struct ipsec_rule *r) return -1; } } else if (r->type == RULE_SA) { - satype = SADB_X_SATYPE_TCPSIGNATURE; + switch (r->proto) { + case IPSEC_TCPMD5: + satype = SADB_X_SATYPE_TCPSIGNATURE; + break; + default: + return -1; + } switch (action) { case PFK_ACTION_ADD: ret = pfkey_sa(fd, satype, SADB_ADD, r->spi, |