Try to detect Windows Clients by looking for INTERNAL_IP4/6_SERVER attribute
authorMartin Willi <martin@revosec.ch>
Wed, 10 Aug 2011 14:57:59 +0000 (16:57 +0200)
committerMartin Willi <martin@revosec.ch>
Fri, 19 Aug 2011 07:16:16 +0000 (09:16 +0200)
src/libcharon/sa/ike_sa.h
src/libcharon/sa/tasks/ike_config.c

index 703f384..cf23de3 100644 (file)
@@ -97,6 +97,11 @@ enum ike_extension_t {
         * peer supports EAP-only authentication, draft-eronen-ipsec-ikev2-eap-auth
         */
        EXT_EAP_ONLY_AUTHENTICATION = (1<<5),
+
+       /**
+        * peer is probably a Windows 7 RAS client
+        */
+       EXT_MS_WINDOWS = (1<<6),
 };
 
 /**
index a61663c..8424711 100644 (file)
@@ -174,6 +174,11 @@ static void process_attribute(private_ike_config_t *this,
                        }
                        break;
                }
+               case INTERNAL_IP4_SERVER:
+               case INTERNAL_IP6_SERVER:
+                       /* assume it's a Windows client if we see proprietary attributes */
+                       this->ike_sa->enable_extension(this->ike_sa, EXT_MS_WINDOWS);
+                       /* fall */
                default:
                {
                        if (this->initiator)