Include radattr RADIUS attribute only if an EAP payload is present
authorMartin Willi <martin@revosec.ch>
Tue, 6 Mar 2012 10:00:35 +0000 (11:00 +0100)
committerMartin Willi <martin@revosec.ch>
Tue, 6 Mar 2012 15:08:32 +0000 (16:08 +0100)
src/libcharon/plugins/radattr/radattr_listener.c

index 188dcb1..94b718a 100644 (file)
@@ -175,7 +175,8 @@ METHOD(listener_t, message, bool,
        ike_sa_t *ike_sa, message_t *message, bool incoming)
 {
        if (ike_sa->supports_extension(ike_sa, EXT_STRONGSWAN) &&
-               message->get_exchange_type(message) == IKE_AUTH)
+               message->get_exchange_type(message) == IKE_AUTH &&
+               message->get_payload(message, EXTENSIBLE_AUTHENTICATION))
        {
                if (incoming)
                {