./test-dhcp-client would attempt to operate fd 0, i.e. stdin.
For example, './test-dhcp-client </dev/null' would fail with EPERM
because /dev/null cannot be used with epoll.
https://bugzilla.redhat.com/show_bug.cgi?id=
1076119
int dhcp_network_bind_udp_socket(be32_t address, uint16_t port)
{
int dhcp_network_bind_udp_socket(be32_t address, uint16_t port)
{
+ int fd;
+
+ fd = socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC, 0);
+ if (fd < 0)
+ return -errno;
+
+ return fd;
}
int dhcp_network_send_udp_socket(int s, be32_t address, uint16_t port,
}
int dhcp_network_send_udp_socket(int s, be32_t address, uint16_t port,