Discard all but Legacy IP packets on VPN transmit
authorDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 1 Jun 2009 18:05:35 +0000 (19:05 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 1 Jun 2009 18:05:35 +0000 (19:05 +0100)
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
cstp.c
dtls.c

diff --git a/cstp.c b/cstp.c
index 99e2018..33e2584 100644 (file)
--- a/cstp.c
+++ b/cstp.c
@@ -609,6 +609,10 @@ int cstp_mainloop(struct openconnect_info *vpninfo, int *timeout)
                vpninfo->outgoing_queue = this->next;
                vpninfo->outgoing_qlen--;
 
+               /* FIXME: Don't know how to handle IPv6 yet */
+               if (this->type != AF_INET)
+                       continue;
+
                if (vpninfo->deflate) {
                        unsigned char *adler;
                        int ret;
diff --git a/dtls.c b/dtls.c
index 7a4263f..929fe8a 100644 (file)
--- a/dtls.c
+++ b/dtls.c
@@ -480,6 +480,10 @@ int dtls_mainloop(struct openconnect_info *vpninfo, int *timeout)
                vpninfo->outgoing_queue = this->next;
                vpninfo->outgoing_qlen--;
 
+               /* FIXME: Don't know how to handle IPv6 yet */
+               if (this->type != AF_INET)
+                       continue;
+
                /* One byte of header */
                this->hdr[7] = AC_PKT_DATA;