From: Alan T. DeKok Date: Fri, 23 Mar 2018 15:01:48 +0000 (-0400) Subject: don't munge src/dst IP/port. May help with #2199 X-Git-Tag: release_3_0_17~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b425489064d896cc94806ddd4db9cc4b89ff7dee;p=thirdparty%2Ffreeradius-server.git don't munge src/dst IP/port. May help with #2199 fr_packet_list_find_byreply() already sets the src/dst ip/port as necessary. --- diff --git a/src/main/radclient.c b/src/main/radclient.c index a7e22f4bf8d..f618ab6c415 100644 --- a/src/main/radclient.c +++ b/src/main/radclient.c @@ -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)",