summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeonah Moon <seonah1.moon@samsung.com>2017-02-10 17:48:30 +0900
committertaesub kim <taesub.kim@samsung.com>2017-02-13 15:16:33 +0900
commit17113aba16e7244946e2e8bc95c8f209c08cf285 (patch)
tree4b379835e9d28d7d6aabc1c70b13061a8c03b991
parentfc578d194ab378e08cd58ccc90dccce4d9425b4e (diff)
downloadconnman-17113aba16e7244946e2e8bc95c8f209c08cf285.tar.gz
connman-17113aba16e7244946e2e8bc95c8f209c08cf285.tar.bz2
connman-17113aba16e7244946e2e8bc95c8f209c08cf285.zip
Change-Id: Ie2d0939e43080aa2c7937f912d13ece6c39fdb9c Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
-rwxr-xr-xsrc/dnsproxy.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dnsproxy.c b/src/dnsproxy.c
index 58ce4427..d44de643 100755
--- a/src/dnsproxy.c
+++ b/src/dnsproxy.c
@@ -3841,6 +3841,7 @@ static GIOChannel *get_listener(int family, int protocol, int index)
int option;
int sd_num = 0;
int rv;
+ int is_socket_inet = 0;
#endif
DBG("family %d protocol %d index %d", family, protocol, index);
@@ -3876,11 +3877,12 @@ static GIOChannel *get_listener(int family, int protocol, int index)
rv = sd_is_socket_inet(sk, family, type, -1, 53);
if(rv > 0){
DBG("socket fd (%d) is passed by systemd", sk);
+ is_socket_inet = 1;
break;
}
}
- if(sk >= SD_LISTEN_FDS_START+sd_num){
+ if (!is_socket_inet) {
DBG("socket fd is not matched what connman requests");
return NULL;
}