From be8b9a1abbbf2f3ea9da540f21279c7fe1191749 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 5 Jul 2007 18:01:54 +0200 Subject: [PATCH] svn_rev_440 what a silly bug of mine. Chances were good we generated a negative port number causing tftp to fail --- net/tftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tftp.c b/net/tftp.c index 2556c90cb..0244783cc 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -355,7 +355,7 @@ TftpStart (void) TftpTimeoutCount = 0; TftpState = STATE_RRQ; /* Use a pseudo-random port unless a specific port is set */ - TftpOurPort = 1024 + ((int)get_time_ns() % 3072); + TftpOurPort = 1024 + ((unsigned int)get_time_ns() % 3072); #ifdef CONFIG_TFTP_PORT if ((ep = getenv("tftpdstp")) != NULL) { TftpServerPort = simple_strtol(ep, NULL, 10);