You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by df...@apache.org on 2002/09/17 23:48:08 UTC

cvs commit: jakarta-commons-sandbox/net/src/java/org/apache/commons/net/tftp TFTPClient.java

dfs         2002/09/17 14:48:07

  Modified:    net/src/java/org/apache/commons/net/tftp TFTPClient.java
  Log:
  Applied my patch from May 2002 which addresses the situation whereby
  the IP address that answers a TFTP file transfer request is different
  from the one it was sent to.  We handle this by using the address
  in the first response packet as the host address.
  
  Revision  Changes    Path
  1.4       +6 -0      jakarta-commons-sandbox/net/src/java/org/apache/commons/net/tftp/TFTPClient.java
  
  Index: TFTPClient.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/net/src/java/org/apache/commons/net/tftp/TFTPClient.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TFTPClient.java	6 Aug 2002 15:23:37 -0000	1.3
  +++ TFTPClient.java	17 Sep 2002 21:48:07 -0000	1.4
  @@ -228,6 +228,12 @@
                   {
                       hostPort = received.getPort();
                       ack.setPort(hostPort);
  +                    if(!host.equals(received.getAddress()))
  +                    {
  +                        host = received.getAddress();
  +                        ack.setAddress(host);
  +                        sent.setAddress(host);
  +                    }
                   }
   
                   // Comply with RFC 783 indication that an error acknowledgement
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>