]> git.saurik.com Git - apple/network_cmds.git/commitdiff
network_cmds-245.12.tar.gz mac-os-x-1046ppc mac-os-x-1046x86 mac-os-x-1047ppc mac-os-x-1047x86 v245.12
authorApple <opensource@apple.com>
Wed, 15 Feb 2006 01:39:45 +0000 (01:39 +0000)
committerApple <opensource@apple.com>
Wed, 15 Feb 2006 01:39:45 +0000 (01:39 +0000)
racoon.tproj/cftoken.l
racoon.tproj/ipsec_doi.c
racoon.tproj/ipsec_doi.h
racoon.tproj/isakmp_agg.c
racoon.tproj/isakmp_ident.c

index 2a465c7778dfd49d09d2f018bae8e6f8730172c1..d9f15bb9a26e970e4d617f7a724950e1e0d59e3f 100644 (file)
@@ -336,6 +336,7 @@ vendor_id   { YYD; yywarn("it is obsoleted."); return(VENDORID); }
 user_fqdn      { YYD; yylval.num = IDTYPE_USERFQDN; return(IDENTIFIERTYPE); }
 fqdn           { YYD; yylval.num = IDTYPE_FQDN; return(IDENTIFIERTYPE); }
 keyid          { YYD; yylval.num = IDTYPE_KEYID; return(IDENTIFIERTYPE); }
+keyid_use      { YYD; yylval.num = IDTYPE_KEYIDUSE; return(IDENTIFIERTYPE); }
 address                { YYD; yylval.num = IDTYPE_ADDRESS; return(IDENTIFIERTYPE); }
 asn1dn         { YYD; yylval.num = IDTYPE_ASN1DN; return(IDENTIFIERTYPE); }
 certname       { YYD; yywarn("certname will be obsoleted in near future."); yylval.num = IDTYPE_ASN1DN; return(IDENTIFIERTYPE); }
index 0b4927493bfaf42bbb97a60a9cb187c0cbb59e20..26567af5760ff725d16e1ff92c79e1d515e68cc5 100644 (file)
@@ -3192,6 +3192,7 @@ ipsecdoi_setid1(iph1)
                ident = getidval(iph1->rmconf->idvtype, iph1->rmconf->idv);
                break;
        case IDTYPE_KEYID:
+       case IDTYPE_KEYIDUSE:
                id_b.type = IPSECDOI_ID_KEY_ID;
                ident = getidval(iph1->rmconf->idvtype, iph1->rmconf->idv);
                break;
@@ -3319,6 +3320,7 @@ set_identifier(vpp, type, value)
        switch (type) {
        case IDTYPE_FQDN:
        case IDTYPE_USERFQDN:
+       case IDTYPE_KEYIDUSE:
                /* length is adjusted since QUOTEDSTRING teminates NULL. */
                new = vmalloc(value->l - 1);
                if (new == NULL)
index 1b53b5d113c52385e342ca9290730b14e2649937..aabd68103d4522a64d871a5c0e022a9bd9cca5c7 100644 (file)
@@ -180,6 +180,7 @@ struct ipsecdoi_pl_id {
 #define IDTYPE_KEYID           2
 #define IDTYPE_ADDRESS         3
 #define IDTYPE_ASN1DN          4
+#define IDTYPE_KEYIDUSE         5
 
 /* shared secret type, it's internal use. */
 #define SECRETTYPE_USE         0
index bcad8051ee5d2a6d93baf4aed9f877fe41aa5a74..2f1ebc56b4dd85043f2696fceff0eb554ef520f4 100644 (file)
@@ -457,18 +457,7 @@ agg_i2recv(iph1, msg)
             pa->type != ISAKMP_NPTYPE_NONE;
             pa++)
        {
-               if (pa->type == ISAKMP_NPTYPE_NATD_RFC ||
-                       pa->type == ISAKMP_NPTYPE_NATD_DRAFT ||
-                       pa->type == ISAKMP_NPTYPE_NATD_BADDRAFT)
-               {
-                       if (pa->type != iph1->natd_payload_type) {
-                               plog(LLV_ERROR, LOCATION, iph1->remote,
-                                       "ignore the packet, "
-                                       "received unexpected natd payload type %d.\n",
-                                       pa->type);
-                               goto end;
-                       }                       
-                       
+               if (pa->type == iph1->natd_payload_type) {
                        natd_match_t match = natd_matches(iph1, pa->ptr);
                        iph1->natt_flags |= natt_natd_received;
                        if ((match & natd_match_local) != 0)
@@ -1388,15 +1377,7 @@ agg_r2recv(iph1, msg0)
                case ISAKMP_NPTYPE_NATD_DRAFT:
                case ISAKMP_NPTYPE_NATD_BADDRAFT:
 #ifdef IKE_NAT_T
-                       if (pa->type != iph1->natd_payload_type) {
-                               plog(LLV_ERROR, LOCATION, iph1->remote,
-                                       "ignore the packet, "
-                                       "received unexpected natd payload type %d.\n",
-                                       pa->type);
-                               goto end;
-                       }
-                               
-                       {
+                       if (pa->type == iph1->natd_payload_type) {
                                natd_match_t match = natd_matches(iph1, pa->ptr);
                                iph1->natt_flags |= natt_natd_received;
                                if ((match & natd_match_local) != 0)
index 6ed424f31c7a443a394b00bf7ba88ff1313d943c..e5c46c24ba25878fd514f54f341b77811e6e8a04 100644 (file)
@@ -441,17 +441,9 @@ ident_i3recv(iph1, msg)
                case ISAKMP_NPTYPE_NATD_DRAFT:
                case ISAKMP_NPTYPE_NATD_BADDRAFT:
 #ifdef IKE_NAT_T
-                       {
-                               natd_match_t match;
                                
-                               if (pa->type != iph1->natd_payload_type) {
-                                       plog(LLV_ERROR, LOCATION, iph1->remote,
-                                               "ignore the packet, "
-                                               "received unexpected natd payload type %d.\n",
-                                               pa->type);
-                                       goto end;
-                               }                       
-                               match = natd_matches(iph1, pa->ptr);
+                       if (pa->type == iph1->natd_payload_type) {
+                               natd_match_t match = natd_matches(iph1, pa->ptr);
                                iph1->natt_flags |= natt_natd_received;
                                if ((match & natd_match_local) != 0)
                                        iph1->natt_flags |= natt_no_local_nat;
@@ -1098,17 +1090,8 @@ ident_r2recv(iph1, msg)
                case ISAKMP_NPTYPE_NATD_DRAFT:
                case ISAKMP_NPTYPE_NATD_BADDRAFT:
 #ifdef IKE_NAT_T
-                       {
-                               natd_match_t match;
-                               
-                               if (pa->type != iph1->natd_payload_type) {
-                                       plog(LLV_ERROR, LOCATION, iph1->remote,
-                                               "ignore the packet, "
-                                               "received unexpected natd payload type %d.\n",
-                                               pa->type);
-                                       goto end;
-                               }                       
-                               match = natd_matches(iph1, pa->ptr);
+                       if (pa->type == iph1->natd_payload_type) {
+                               natd_match_t match = natd_matches(iph1, pa->ptr);
                                iph1->natt_flags |= natt_natd_received;
                                if ((match & natd_match_local) != 0)
                                        iph1->natt_flags |= natt_no_local_nat;