diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2007-07-05 18:01:54 +0200 |
---|---|---|
committer | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-07-05 18:01:54 +0200 |
commit | be8b9a1abbbf2f3ea9da540f21279c7fe1191749 (patch) | |
tree | 1ef0541060b3402141f21a8daef9dbd273a5c8b2 | |
parent | 49e479cecbe4327e1c61125d1be359cac7835387 (diff) | |
download | barebox-be8b9a1abbbf2f3ea9da540f21279c7fe1191749.tar.gz barebox-be8b9a1abbbf2f3ea9da540f21279c7fe1191749.tar.xz |
svn_rev_440
what a silly bug of mine. Chances were good we generated a negative
port number causing tftp to fail
-rw-r--r-- | net/tftp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tftp.c b/net/tftp.c index 2556c90cb6..0244783ccc 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); |