diff options
author | Jaehyun Kim <jeik01.kim@samsung.com> | 2019-01-24 22:24:50 +0900 |
---|---|---|
committer | Jaehyun Kim <jeik01.kim@samsung.com> | 2019-01-24 22:24:50 +0900 |
commit | 1e03ed8e01341985c63bd218ab40217f0a72cd63 (patch) | |
tree | a1b9995573ed847298b41573d477fc2c68a98e49 /src/dnsproxy.c | |
parent | c974e1bb4bbe5070dde8db78262c62959ca9b423 (diff) | |
download | connman-1e03ed8e01341985c63bd218ab40217f0a72cd63.tar.gz connman-1e03ed8e01341985c63bd218ab40217f0a72cd63.tar.bz2 connman-1e03ed8e01341985c63bd218ab40217f0a72cd63.zip |
Fixed SVACE issuessubmit/tizen/20190125.015829accepted/tizen/unified/20190128.061809
Change-Id: I84e9c9a7719e017892d4f353cf141901ca94beb8
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
Diffstat (limited to 'src/dnsproxy.c')
-rwxr-xr-x | src/dnsproxy.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dnsproxy.c b/src/dnsproxy.c index 3fa7bf46..72c0d8f1 100755 --- a/src/dnsproxy.c +++ b/src/dnsproxy.c @@ -3956,7 +3956,11 @@ static GIOChannel *get_listener(int family, int protocol, int index) /* When ConnMan crashed, * probably DNS listener cannot bind existing address */ option = 1; - setsockopt(sk, SOL_SOCKET, SO_REUSEADDR, &option, sizeof(option)); + if (setsockopt(sk, SOL_SOCKET, SO_REUSEADDR, &option, sizeof(option)) < 0) { + connman_error("Failed to set socket option SO_REUSEADDR"); + close(sk); + return NULL; + } #endif #if !defined TIZEN_EXT if (bind(sk, &s.sa, slen) < 0) { |