summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiraj Kumar Goit <niraj.g@samsung.com>2016-06-14 17:25:50 (GMT)
committerNiraj Kumar Goit <niraj.g@samsung.com>2016-06-14 14:30:19 (GMT)
commit41eeeef790db4c1c266548ce49558061143aac10 (patch)
tree73d4f383efc3a212198823a86f51066d35aff446
parentad827936df8179d2e8ca02bd1fa7c35e4b41221a (diff)
downloadconnman-41eeeef790db4c1c266548ce49558061143aac10.zip
connman-41eeeef790db4c1c266548ce49558061143aac10.tar.gz
connman-41eeeef790db4c1c266548ce49558061143aac10.tar.bz2
[SPIN] Add the dns address validation checking logicrefs/changes/47/74547/3
desc : some of AP sends the DNS response even though AP is not connected with internet service. In this case, DNS response address is not proper - it is the private address. So, we check the address validation before sending the internet url. Change-Id: I5dae725e931e5d66072bb809c8cce489ffa79379 Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
-rwxr-xr-xgweb/gweb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gweb/gweb.c b/gweb/gweb.c
index 99709ca..b6d581c 100755
--- a/gweb/gweb.c
+++ b/gweb/gweb.c
@@ -1262,6 +1262,16 @@ static void resolv_result(GResolvResultStatus status,
return;
}
+#if defined TIZEN_EXT
+ // check the DNS address validation
+ // if dns is the class c private address
+ // wispr should be stopped - non internet connection
+ if(g_str_has_prefix(results[0],"192.168.")){
+ call_result_func(session, 404);
+ return;
+ }
+#endif
+
g_free(session->address);
session->address = g_strdup(results[0]);