Send EAP-Nak with supported types if requested type is unsupported
[strongswan.git] / src / libcharon / plugins / eap_peap / eap_peap_peer.c
index 72e201f..96d4d0f 100644 (file)
@@ -85,7 +85,7 @@ METHOD(tls_application_t, process, status_t,
                default:
                        return FAILED;
        }
-               
+
        in = eap_payload_create_data(data);
        DBG3(DBG_IKE, "%B", &data);
        chunk_free(&data);
@@ -151,7 +151,8 @@ METHOD(tls_application_t, process, status_t,
                if (!this->ph2_method)
                {
                        DBG1(DBG_IKE, "EAP method not supported");
-                       this->out = eap_payload_create_nak(in->get_identifier(in));
+                       this->out = eap_payload_create_nak(in->get_identifier(in),
+                                                                                          received_vendor != 0);
                        in->destroy(in);
                        return NEED_MORE;
                }