restored lost IKEv2 packet suppression
authorAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 3 Jul 2006 14:39:57 +0000 (14:39 -0000)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 3 Jul 2006 14:39:57 +0000 (14:39 -0000)
src/pluto/demux.c

index db7f1c4..eaacd3e 100644 (file)
@@ -1196,6 +1196,19 @@ read_packet(struct msg_digest *md)
        }
 #endif
 
+#define IKEV2_VERSION_OFFSET   17
+#define IKEV2_VERSION          0x20
+
+    /* ignore IKEv2 packets - they will be handled by charon */
+    if (pbs_room(&md->packet_pbs) > IKEV2_VERSION_OFFSET
+    &&  md->packet_pbs.start[IKEV2_VERSION_OFFSET] == IKEV2_VERSION)
+    {
+       DBG(DBG_CONTROLMORE,
+           DBG_log("  ignoring IKEv2 packet")
+       )
+       return FALSE;
+    }
+
     return TRUE;
 }