aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp')
-rw-r--r--networking/udhcp/socket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/networking/udhcp/socket.c b/networking/udhcp/socket.c
index f12fa9290..df00e6985 100644
--- a/networking/udhcp/socket.c
+++ b/networking/udhcp/socket.c
@@ -141,6 +141,8 @@ int raw_socket(int ifindex)
DEBUG(LOG_ERR, "socket call failed: %m");
return -1;
}
+
+ while (fd >= 0 && fd < 3) fd = dup(fd); /* don't let daemon close fds on us */
sock.sll_family = AF_PACKET;
sock.sll_protocol = htons(ETH_P_IP);