Skip to content

Commit

Permalink
sockd: create_udp_socket() shouldn't set SO_DONTROUTE.
Browse files Browse the repository at this point in the history
Otherwise unicast messages to the DHCP server (such DHCPREQUESTs
sent in the RENEWING state) will fail if the DHCP server is on a
different network subnet.
  • Loading branch information
niklata committed May 23, 2024
1 parent 176d26a commit a19c2f3
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions sockd.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,6 @@ static int create_udp_socket(uint32_t ip, uint16_t port, char *iface)
client_config.interface, __func__, strerror(errno));
goto out_fd;
}
if (setsockopt(fd, SOL_SOCKET, SO_DONTROUTE, &opt, sizeof opt) < 0) {
log_line("%s: (%s) Set don't route failed: %s\n",
client_config.interface, __func__, strerror(errno));
goto out_fd;
}
struct ifreq ifr;
memset(&ifr, 0, sizeof ifr);
if (!memccpy(ifr.ifr_name, iface, 0, sizeof ifr.ifr_name)) {
Expand Down

0 comments on commit a19c2f3

Please sign in to comment.