X-Git-Url: https://git.saurik.com/apple/network_cmds.git/blobdiff_plain/3daef399aa12707bd9256a87337e559c62bd9759..3a228055bcb6b0f405b477b03971508f12ba624a:/racoon.tproj/isakmp_ident.c diff --git a/racoon.tproj/isakmp_ident.c b/racoon.tproj/isakmp_ident.c index ca55619..6ed424f 100644 --- a/racoon.tproj/isakmp_ident.c +++ b/racoon.tproj/isakmp_ident.c @@ -1649,10 +1649,17 @@ ident_ir2mx(iph1) #ifdef IKE_NAT_T if (natd_type) { - if (iph1->local_natd) - p = set_isakmp_payload(p, iph1->local_natd, natd_type); - if (iph1->remote_natd) - p = set_isakmp_payload(p, iph1->remote_natd, ISAKMP_NPTYPE_NONE); + if ((iph1->natt_flags & NATT_TYPE_MASK) == natt_type_apple) { + if (iph1->local_natd) + p = set_isakmp_payload(p, iph1->local_natd, natd_type); + if (iph1->remote_natd) + p = set_isakmp_payload(p, iph1->remote_natd, ISAKMP_NPTYPE_NONE); + } else { + if (iph1->remote_natd) + p = set_isakmp_payload(p, iph1->remote_natd, natd_type); + if (iph1->local_natd) + p = set_isakmp_payload(p, iph1->local_natd, ISAKMP_NPTYPE_NONE); + } } #endif error = 0;