udhcpc: remove code which requires server ID to be on local network

This reverts "udhcpc: paranoia when using kernel UDP mode
for sending renew: server ID may be bogus".

Users complain that they do have servers behind routers
(with DHCP relays).

function                                             old     new   delta
send_packet                                          168     166      -2
bcast_or_ucast                                        25      23      -2
udhcp_send_kernel_packet                             301     295      -6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-10)             Total: -10 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2018-06-21 17:36:22 +02:00
parent 6fb8bd795c
commit 148788eb0e
5 changed files with 8 additions and 21 deletions

View File

@@ -591,9 +591,7 @@ static void send_packet_to_relay(struct dhcp_packet *dhcp_pkt)
udhcp_send_kernel_packet(dhcp_pkt,
server_config.server_nip, SERVER_PORT,
dhcp_pkt->gateway_nip, SERVER_PORT,
/*send_flags:*/ 0
);
dhcp_pkt->gateway_nip, SERVER_PORT);
}
static void send_packet(struct dhcp_packet *dhcp_pkt, int force_broadcast)