diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-06-21 18:36:22 +0300 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-06-21 18:38:14 +0300 |
commit | 148788eb0ee96026105755cf3fd1ad3d94f49cd2 (patch) | |
tree | aa300fa3e844410b823b87ca759060b668ff5b80 /networking/udhcp/dhcpc.c | |
parent | 6fb8bd795c3f40735ced3f51b8082f91956fd786 (diff) |
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>
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r-- | networking/udhcp/dhcpc.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index c206a5825..c2805a009 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c @@ -693,16 +693,10 @@ static int raw_bcast_from_client_config_ifindex(struct dhcp_packet *packet, uint static int bcast_or_ucast(struct dhcp_packet *packet, uint32_t ciaddr, uint32_t server) { - if (server) { - /* Without MSG_DONTROUTE, the packet was seen routed over - * _other interface_ if server ID is bogus (example: 1.1.1.1). - */ + if (server) return udhcp_send_kernel_packet(packet, ciaddr, CLIENT_PORT, - server, SERVER_PORT, - /*send_flags: "to hosts only on directly connected networks" */ MSG_DONTROUTE - ); - } + server, SERVER_PORT); return raw_bcast_from_client_config_ifindex(packet, ciaddr); } |