From 41eeeef790db4c1c266548ce49558061143aac10 Mon Sep 17 00:00:00 2001 From: Niraj Kumar Goit Date: Tue, 14 Jun 2016 22:55:50 +0530 Subject: [SPIN] Add the dns address validation checking logic 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 --- gweb/gweb.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gweb') diff --git a/gweb/gweb.c b/gweb/gweb.c index 99709caa..b6d581c8 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]); -- cgit v1.2.3