From 148788eb0ee96026105755cf3fd1ad3d94f49cd2 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 21 Jun 2018 17:36:22 +0200 Subject: 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 --- networking/udhcp/d6_dhcpc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'networking/udhcp/d6_dhcpc.c') diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c index 4dbc2b1bd..ed2255ef3 100644 --- a/networking/udhcp/d6_dhcpc.c +++ b/networking/udhcp/d6_dhcpc.c @@ -803,15 +803,13 @@ static NOINLINE int send_d6_renew(uint32_t xid, struct in6_addr *server_ipv6, st opt_ptr = add_d6_client_options(opt_ptr); bb_error_msg("sending %s", "renew"); - if (server_ipv6) { + if (server_ipv6) return d6_send_kernel_packet( &packet, (opt_ptr - (uint8_t*) &packet), our_cur_ipv6, CLIENT_PORT6, server_ipv6, SERVER_PORT6, client_config.ifindex - /* TODO? send_flags: MSG_DONTROUTE (see IPv4 code for reason why) */ ); - } return d6_mcast_from_client_config_ifindex(&packet, opt_ptr); } -- cgit v1.2.3