diff packages/redboot/current/src/net/tftp_client.c @ 1605:43a89c18d005

Add checking (assert) for size of option arrays. Also fix port for TFTP on little endian systems.
author gthomas
date Fri, 23 Apr 2004 20:38:17 +0000
parents dbcfe4e0dbd2
children
line wrap: on
line diff
--- a/packages/redboot/current/src/net/tftp_client.c
+++ b/packages/redboot/current/src/net/tftp_client.c
@@ -105,6 +105,8 @@ tftp_stream_open(connection_info_t *info
 
     if (info->server->sin_port == 0) {
         info->server->sin_port = htons(TFTP_PORT);
+    } else {
+        info->server->sin_port = htons(info->server->sin_port);
     }
 
     // Send request - note: RFC 1350 (TFTP rev 2) indicates that this should be