summaryrefslogtreecommitdiff
path: root/sbin/iked/pfkey.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2010-06-26 18:32:35 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2010-06-26 18:32:35 +0000
commita5e4dc3e4044f83627e8e25d18bd770a3268143f (patch)
tree92c99b92e095f1bac748c42217007a4e34f06c4a /sbin/iked/pfkey.c
parentb7bb87be35f33a31cb03eaef1f259f52b9c85636 (diff)
Include the Id type in the generated SA tag that is passed to the
kernel, just like isakmpd does it. In difference to isakmpd, the Id type is printed in capital letters, eg. FQDN/foo.example.com, because it is using the existing print_map() API. For consistency, rename a few Id types in grammar and code from the RFC-names to the OpenBSD-style names; including RFC822_ADDR to UFQDN, IPV4_ADDR to just IPV4, DER_ASN1_DN to ASN1_DN etc.
Diffstat (limited to 'sbin/iked/pfkey.c')
-rw-r--r--sbin/iked/pfkey.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sbin/iked/pfkey.c b/sbin/iked/pfkey.c
index bcdd3636a9e..9cb945efc68 100644
--- a/sbin/iked/pfkey.c
+++ b/sbin/iked/pfkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkey.c,v 1.5 2010/06/14 21:12:56 reyk Exp $ */
+/* $OpenBSD: pfkey.c,v 1.6 2010/06/26 18:32:34 reyk Exp $ */
/* $vantronix: pfkey.c,v 1.11 2010/06/03 07:57:33 reyk Exp $ */
/*
@@ -1060,15 +1060,15 @@ pfkey_id2ident(struct iked_id *id, u_int exttype)
case IKEV2_ID_FQDN:
type = SADB_IDENTTYPE_FQDN;
break;
- case IKEV2_ID_RFC822_ADDR:
+ case IKEV2_ID_UFQDN:
type = SADB_IDENTTYPE_USERFQDN;
break;
- case IKEV2_ID_IPV4_ADDR:
- case IKEV2_ID_IPV6_ADDR:
+ case IKEV2_ID_IPV4:
+ case IKEV2_ID_IPV6:
type = SADB_IDENTTYPE_PREFIX;
break;
- case IKEV2_ID_DER_ASN1_DN:
- case IKEV2_ID_DER_ASN1_GN:
+ case IKEV2_ID_ASN1_DN:
+ case IKEV2_ID_ASN1_GN:
case IKEV2_ID_KEY_ID:
case IKEV2_ID_NONE:
default:
@@ -1078,7 +1078,7 @@ pfkey_id2ident(struct iked_id *id, u_int exttype)
bzero(&idstr, sizeof(idstr));
- if (print_id(id, sizeof(struct ikev2_id), idstr, sizeof(idstr)) == -1)
+ if (print_id(id, idstr, sizeof(idstr)) == -1)
return (NULL);
len = ROUNDUP(strlen(idstr) + 1) + sizeof(*sa_id);