]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
don't munge src/dst IP/port. May help with #2199
authorAlan T. DeKok <aland@freeradius.org>
Fri, 23 Mar 2018 15:01:48 +0000 (11:01 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 23 Mar 2018 15:04:48 +0000 (11:04 -0400)
fr_packet_list_find_byreply() already sets the src/dst ip/port
as necessary.

src/main/radclient.c

index a7e22f4bf8daf22153ac4232b680f88567f66f2d..f618ab6c415379b65812e3b06a8121c7b135a00d 100644 (file)
@@ -1028,32 +1028,6 @@ static int recv_one_packet(int wait_time)
                return -1;      /* bad packet */
        }
 
-       /*
-        *      We don't use udpfromto.  So if we bind to "*", we want
-        *      to find replies sent to 192.0.2.4.  Therefore, we
-        *      force all replies to have the one address we know
-        *      about, no matter what real address they were sent to.
-        *
-        *      This only works if were not using any of the
-        *      Packet-* attributes, or running with 'auto'.
-        */
-       reply->dst_ipaddr = client_ipaddr;
-       reply->dst_port = client_port;
-
-#ifdef WITH_TCP
-
-       /*
-        *      TCP sockets don't use recvmsg(), and thus don't get
-        *      the source IP/port.  However, since they're TCP, we
-        *      know what the source IP/port is, because that's where
-        *      we connected to.
-        */
-       if (ipproto == IPPROTO_TCP) {
-               reply->src_ipaddr = server_ipaddr;
-               reply->src_port = server_port;
-       }
-#endif
-
        packet_p = fr_packet_list_find_byreply(pl, reply);
        if (!packet_p) {
                ERROR("Received reply to request we did not send. (id=%d socket %d)",