summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeonah Moon <seonah1.moon@samsung.com>2017-02-10 08:48:30 (GMT)
committerSeonah Moon <seonah1.moon@samsung.com>2017-02-10 08:48:51 (GMT)
commit732b356621f0b54de4608696e7e9d23416eb2bc6 (patch)
tree0495fd7e3512d32217af63657cd9401652bb7f8d
parent217f9288e9ea5ac4792cd920b9f27b3315ee2bdd (diff)
downloadconnman-732b356621f0b54de4608696e7e9d23416eb2bc6.zip
connman-732b356621f0b54de4608696e7e9d23416eb2bc6.tar.gz
connman-732b356621f0b54de4608696e7e9d23416eb2bc6.tar.bz2
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 58ce442..d44de64 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;
}