* [U-Boot-Users] Patch: allow a fixed port for TFTP
@ 2005-01-10 17:09 Jerry Van Baren
2005-01-10 22:52 ` Tolunay Orkun
2005-09-24 20:38 ` Wolfgang Denk
0 siblings, 2 replies; 5+ messages in thread
From: Jerry Van Baren @ 2005-01-10 17:09 UTC (permalink / raw)
To: u-boot
Hi Wolfgang, try two on the patch attached.
* Patch by Jerry Van Baren 10 January 2005
- Add a configuration option CONFIG_TFTP_PORT and optional env
variable tftpport to force TFTP to use a fixed UDP port.
gvb
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 050110-tftp.patch
Url: http://lists.denx.de/pipermail/u-boot/attachments/20050110/cb2dea1f/attachment.txt
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] Patch: allow a fixed port for TFTP
2005-01-10 17:09 [U-Boot-Users] Patch: allow a fixed port for TFTP Jerry Van Baren
@ 2005-01-10 22:52 ` Tolunay Orkun
2005-01-11 15:08 ` Jerry Van Baren
2005-09-24 20:38 ` Wolfgang Denk
1 sibling, 1 reply; 5+ messages in thread
From: Tolunay Orkun @ 2005-01-10 22:52 UTC (permalink / raw)
To: u-boot
Jerry,
I have expressed my view that this patch does not address a real
problem. You mentioned that all these modifications were necessary
because the user were unable to configure their computer (lack of
necessary skills or lack of administrative access to configure Windows
firewall).
Nevertheless, if Wolfgang approves it, I would prefer changes to the
name of environment variable you are using. When referring to TCP/IP
services, we normally associate ports with the port the server component
is listening. Thus "tftpport" is not clear enough and may mislead people
to the server port. I would prefer more verbose "tftpclientport" or
"tftpsrcport". This would allow us to define "tftpserverport" or
"tftpdestport" later if necessary as well.
I do not object to CONFIG_TFTP_PORT, since same variable could be use to
enable configurable client and server ports if tftpserverport were to be
defined. In fact, I would include support for server port environment
support now since it would make your match more useful for a larger
audience IMHO.
Best regards,
Tolunay
Jerry Van Baren wrote:
> Hi Wolfgang, try two on the patch attached.
>
> * Patch by Jerry Van Baren 10 January 2005
> - Add a configuration option CONFIG_TFTP_PORT and optional env
> variable tftpport to force TFTP to use a fixed UDP port.
>
> gvb
>
>
> ------------------------------------------------------------------------
>
> Index: README
> ===================================================================
> RCS file: /cvsroot/u-boot/u-boot/README,v
> retrieving revision 1.117
> diff -p -u -r1.117 README
> --- README 9 Jan 2005 23:16:42 -0000 1.117
> +++ README 10 Jan 2005 04:13:50 -0000
> @@ -1480,6 +1480,22 @@ The following options need to be configu
> When SystemACE support is added, the "ace" device type
> becomes available to the fat commands, i.e. fatls.
>
> +- TFTP Fixed UDP Port:
> + CONFIG_TFTP_PORT
> +
> + If this is defined, the environment variable tftpport
> + is used to supply the TFTP UDP source port value.
> + If tftpport isn't defined, the normal pseudo-random port
> + number generator is used.
> +
> + The purpose for this is to allow a TFTP server to
> + blindly start the TFTP transfer using the pre-configured
> + target IP address and UDP port. This has the effect of
> + "punching through" the (Windows XP) firewall, allowing
> + the remainder of the TFTP transfer to proceed normally.
> + A better solution is to properly configure the firewall,
> + but sometimes that is not allowed.
> +
> - Show boot progress:
> CONFIG_SHOW_BOOT_PROGRESS
>
> @@ -2432,6 +2448,9 @@ Some configuration options can be set us
> Useful on scripts which control the retry operation
> themselves.
>
> + tftpport - If this is set, the value is used for TFTP's
> + UDP source port.
> +
> vlan - When set to a value < 4095 the traffic over
> ethernet is encapsulated/received over 802.1q
> VLAN tagged frames.
> Index: net/tftp.c
> ===================================================================
> RCS file: /cvsroot/u-boot/u-boot/net/tftp.c,v
> retrieving revision 1.9
> diff -p -u -r1.9 tftp.c
> --- net/tftp.c 15 Apr 2004 21:48:55 -0000 1.9
> +++ net/tftp.c 10 Jan 2005 04:13:51 -0000
> @@ -301,6 +301,10 @@ TftpTimeout (void)
> void
> TftpStart (void)
> {
> +#ifdef CONFIG_TFTP_PORT
> + char *ep; /* Environment pointer */
> +#endif
> +
> if (BootFile[0] == '\0') {
> IPaddr_t OurIP = ntohl(NetOurIP);
>
> @@ -354,7 +358,13 @@ TftpStart (void)
> TftpServerPort = WELL_KNOWN_PORT;
> TftpTimeoutCount = 0;
> TftpState = STATE_RRQ;
> + /* Use a pseudo-random port unless a specific port is set */
> TftpOurPort = 1024 + (get_timer(0) % 3072);
> +#ifdef CONFIG_TFTP_PORT
> + if ((ep = getenv("tftpport")) != NULL) {
> + TftpOurPort= simple_strtol(ep, NULL, 10);
> + }
> +#endif
> TftpBlock = 0;
>
> /* zero out server ether in case the server ip has changed */
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] Patch: allow a fixed port for TFTP
2005-01-10 22:52 ` Tolunay Orkun
@ 2005-01-11 15:08 ` Jerry Van Baren
2005-01-11 22:46 ` Wolfgang Denk
0 siblings, 1 reply; 5+ messages in thread
From: Jerry Van Baren @ 2005-01-11 15:08 UTC (permalink / raw)
To: u-boot
Tolunay Orkun wrote:
> Jerry,
>
> I have expressed my view that this patch does not address a real
> problem. You mentioned that all these modifications were necessary
> because the user were unable to configure their computer (lack of
> necessary skills or lack of administrative access to configure Windows
> firewall).
>
> Nevertheless, if Wolfgang approves it, I would prefer changes to the
> name of environment variable you are using. When referring to TCP/IP
> services, we normally associate ports with the port the server component
> is listening. Thus "tftpport" is not clear enough and may mislead people
> to the server port. I would prefer more verbose "tftpclientport" or
> "tftpsrcport". This would allow us to define "tftpserverport" or
> "tftpdestport" later if necessary as well.
>
> I do not object to CONFIG_TFTP_PORT, since same variable could be use to
> enable configurable client and server ports if tftpserverport were to be
> defined. In fact, I would include support for server port environment
> support now since it would make your match more useful for a larger
> audience IMHO.
>
> Best regards,
> Tolunay
>
> Jerry Van Baren wrote:
>
>> Hi Wolfgang, try two on the patch attached.
>>
>> * Patch by Jerry Van Baren 10 January 2005
>> - Add a configuration option CONFIG_TFTP_PORT and optional env
>> variable tftpport to force TFTP to use a fixed UDP port.
>>
>> gvb
I kind of like tftpclientport, that is much more descriptive. Thanks
for the suggestion. I've rolled Yet Another Patch[tm].
gvb
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] Patch: allow a fixed port for TFTP
2005-01-11 15:08 ` Jerry Van Baren
@ 2005-01-11 22:46 ` Wolfgang Denk
0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2005-01-11 22:46 UTC (permalink / raw)
To: u-boot
In message <41E3EBE0.3070909@smiths-aerospace.com> you wrote:
>
> I kind of like tftpclientport, that is much more descriptive. Thanks
... and a PITA to type. Please use SHORT and escriptive names.
Also keep in mind that the environment is limited in size, and that
long names just add delay when booting (especially with environment
in EEPROM).
Don't tell me I'm picking nits. I've seen cases where simply re-
entering the same (!) value for the "baudrate" variable added nearly
5 seconds (!!!) to the total boot time.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"It is better to have tried and failed than to have failed to try,
but the result's the same." - Mike Dennison
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] Patch: allow a fixed port for TFTP
2005-01-10 17:09 [U-Boot-Users] Patch: allow a fixed port for TFTP Jerry Van Baren
2005-01-10 22:52 ` Tolunay Orkun
@ 2005-09-24 20:38 ` Wolfgang Denk
1 sibling, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2005-09-24 20:38 UTC (permalink / raw)
To: u-boot
In message <41E2B6B3.5050805@smiths-aerospace.com> you wrote:
>
> * Patch by Jerry Van Baren 10 January 2005
> - Add a configuration option CONFIG_TFTP_PORT and optional env
> variable tftpport to force TFTP to use a fixed UDP port.
Added, thanks.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The White Rabbit put on his spectacles. "Where shall I begin, please
your Majesty ?" he asked.
"Begin at the beginning,", the King said, very gravely, "and go on
till you come to the end: then stop." -- Lewis Carroll
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-09-24 20:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-10 17:09 [U-Boot-Users] Patch: allow a fixed port for TFTP Jerry Van Baren
2005-01-10 22:52 ` Tolunay Orkun
2005-01-11 15:08 ` Jerry Van Baren
2005-01-11 22:46 ` Wolfgang Denk
2005-09-24 20:38 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox