summaryrefslogtreecommitdiffhomepage
path: root/src/odhcpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/odhcpd.c')
-rw-r--r--src/odhcpd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/odhcpd.c b/src/odhcpd.c
index 9ab849a..fe4dd73 100644
--- 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;