projects
/
oweals
/
odhcpd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81a281e
)
odhcpd: Check if open the ioctl socket failed
author
Hyeonsik Song
<blogcin@naver.com>
Thu, 5 Jul 2018 01:45:37 +0000
(10:45 +0900)
committer
Hans Dedecker
<dedeckeh@gmail.com>
Thu, 5 Jul 2018 09:40:43 +0000
(11:40 +0200)
Signed-off-by: Hyeonsik Song <blogcin@naver.com>
src/odhcpd.c
patch
|
blob
|
history
diff --git
a/src/odhcpd.c
b/src/odhcpd.c
index 9ab849aa75086a9e8d9b8b50b7f97284ecf45115..fe4dd732731bcc6405b5839fce77e59b87df5866 100644
(file)
--- a/
src/odhcpd.c
+++ b/
src/odhcpd.c
@@
-91,6
+91,9
@@
int main(int argc, char **argv)
ioctl_sock = socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);
+ if (ioctl_sock < 0)
+ return 4;
+
if ((urandom_fd = open("/dev/urandom", O_RDONLY | O_CLOEXEC)) < 0)
return 4;