tags 613582 +patch
thanks

I propose the patch attached.
Tested on my system: works fine for me, solves my problem.

Cheers, Paul

Paul Szabo   p...@maths.usyd.edu.au   http://www.maths.usyd.edu.au/u/psz/
School of Mathematics and Statistics   University of Sydney    Australia
--- atftp-0.7.dfsg.ORIG/tftpd.c	2011-08-11 06:20:16.000000000 +1000
+++ atftp-0.7.dfsg/tftpd.c	2011-08-11 06:40:50.000000000 +1000
@@ -638,8 +638,14 @@
           /* open a socket for client communication */
           data->sockfd = socket(data->client_info->client.ss_family,
                                 SOCK_DGRAM, 0);
-          memset(&to, 0, sizeof(to));
+          /*memset(&to, 0, sizeof(to));*/
+          /* PSz 11 Aug 2011  http://bugs.debian.org/613582
+           * Do not nullify "to", preserve IP address from tftp_get_packet().
+           * Only set port to 0, as we used to in v6.
+           * (Why set ss_family, was not it right already??)
+           */
           to.ss_family = data->client_info->client.ss_family;
+          sockaddr_set_port(&to, 0);
           /* Force socket to listen on local address. Do not listen on broadcast address 255.255.255.255. 
              If the socket listens on the broadcast address, Linux tells the remote client the port
              is unreachable. This happens even if SO_BROADCAST is set in setsockopt for this socket.

Reply via email to