]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
dns-proxy: Don't use proxy socket if we fail to bypass it
authorTobias Brunner <tobias@strongswan.org>
Wed, 30 Jul 2014 07:48:08 +0000 (09:48 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 30 Jul 2014 07:48:08 +0000 (09:48 +0200)
This will result in an infinite loop as packets sent over that socket
will again pass through the TUN device and the DNS proxy.

Apparently, bypassing fails when airplane mode is enabled.

Fixes #662.

src/frontends/android/jni/libandroidbridge/backend/android_dns_proxy.c

index 045f2c1d1c2d5c6169e18ce125ca7c025accc5fa..908e37238aaa0d28d677177a82cda26ce78aafd0 100644 (file)
@@ -125,6 +125,8 @@ static int open_socket(int family)
                                                                                                skt, family))
        {
                DBG1(DBG_NET, "installing bypass policy for proxy socket failed");
+               close(skt);
+               return -1;
        }
        return skt;
 }