]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
don't use client IP for sourcing replies
authorAlan T. DeKok <aland@freeradius.org>
Thu, 17 May 2018 14:12:00 +0000 (10:12 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 18 May 2018 13:51:59 +0000 (09:51 -0400)
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

src/modules/proto_dhcpv4/proto_dhcpv4.c

index c522ccaade6a2bfa8499a06a3928b7044f960e36..934c5273e9bda6340730dff76ae0d5215cf08489 100644 (file)
@@ -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) {