summaryrefslogtreecommitdiffstats
path: root/src/proto/tftp.c
diff options
context:
space:
mode:
authorMichael Brown2005-05-02 01:57:09 +0200
committerMichael Brown2005-05-02 01:57:09 +0200
commitf14af3d95c618fe3b57e38fa005a9d85d9ccaa81 (patch)
treef0cc27c56756dfd008f01e31396af238b9911c6e /src/proto/tftp.c
parentMade parse_url do more of the processing, to avoid duplicating parts of (diff)
downloadipxe-f14af3d95c618fe3b57e38fa005a9d85d9ccaa81.tar.gz
ipxe-f14af3d95c618fe3b57e38fa005a9d85d9ccaa81.tar.xz
ipxe-f14af3d95c618fe3b57e38fa005a9d85d9ccaa81.zip
Protocol structure can now specify the default port.
Diffstat (limited to 'src/proto/tftp.c')
-rw-r--r--src/proto/tftp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/proto/tftp.c b/src/proto/tftp.c
index 9c0e55638..c59807d7b 100644
--- a/src/proto/tftp.c
+++ b/src/proto/tftp.c
@@ -50,8 +50,6 @@ int tftp_block ( struct tftpreq_info_t *request,
blksize = TFTP_DEFAULTSIZE_PACKET;
lport++; /* Use new local port */
server = *(request->server);
- if ( ! server.sin_port )
- server.sin_port = TFTP_PORT;
if ( !udp_transmit(server.sin_addr.s_addr, lport,
server.sin_port, xmitlen, &xmit) )
return (0);
@@ -170,5 +168,7 @@ int tftp ( char *url __unused,
}
struct protocol tftp_protocol __default_protocol = {
- "tftp", tftp
+ .name = "tftp",
+ .default_port = TFTP_PORT,
+ .load = tftp,
};