From: Alan T. DeKok Date: Thu, 17 May 2018 14:12:00 +0000 (-0400) Subject: don't use client IP for sourcing replies X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8acd34c536ef4512e5c878314082dace60faff98;p=thirdparty%2Ffreeradius-server.git don't use client IP for sourcing replies we have to do the full DHCP whatever stuff... which is horribly complicated. It's probably best to just use functions for each DHCP packet type --- diff --git a/src/modules/proto_dhcpv4/proto_dhcpv4.c b/src/modules/proto_dhcpv4/proto_dhcpv4.c index c522ccaade6..934c5273e9b 100644 --- a/src/modules/proto_dhcpv4/proto_dhcpv4.c +++ b/src/modules/proto_dhcpv4/proto_dhcpv4.c @@ -396,18 +396,6 @@ static ssize_t mod_encode(UNUSED void const *instance, UNUSED REQUEST *request, if (data_len > 0) return data_len; } -#ifdef WITH_UDPFROMTO - /* - * Overwrite the src ip address on the outbound packet - * with the one specified by the client. This is useful - * to work around broken DSR implementations and other - * routing issues. - */ - if (client->src_ipaddr.af != AF_UNSPEC) { - request->reply->src_ipaddr = client->src_ipaddr; - } -#endif - data_len = fr_dhcpv4_encode(buffer, buffer_len, request->reply->code, request->reply->id, request->reply->vps); if (data_len < 0) {