diff options
author | Wolfgang Denk <wd@denx.de> | 2008-12-09 01:00:24 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-12-09 01:00:24 +0100 |
commit | c645b181a9a848996d54a5e358bedabae1da566a (patch) | |
tree | a05030fe0bfc31b049a2d498e0e8090816f28352 /net | |
parent | 5e3ab68e9acf9edf304b8aa32ad7e005483a2c47 (diff) | |
parent | 6a86bb6c25376f0358478219fa28d7c84dd01ed0 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-net
Diffstat (limited to 'net')
-rw-r--r-- | net/net.c | 7 | ||||
-rw-r--r-- | net/tftp.c | 3 |
2 files changed, 5 insertions, 5 deletions
diff --git a/net/net.c b/net/net.c index e9754e47b8f..e6547f9eddc 100644 --- a/net/net.c +++ b/net/net.c @@ -738,7 +738,7 @@ int PingSend(void) ip->ip_tos = 0; ip->ip_len = htons(IP_HDR_SIZE_NO_UDP + 8); ip->ip_id = htons(NetIPID++); - ip->ip_off = htons(0x4000); /* No fragmentation */ + ip->ip_off = htons(IP_FLAGS_DFRAG); /* Don't fragment */ ip->ip_ttl = 255; ip->ip_p = 0x01; /* ICMP */ ip->ip_sum = 0; @@ -1402,7 +1402,8 @@ NetReceive(volatile uchar * inpkt, int len) if ((ip->ip_hl_v & 0xf0) != 0x40) { return; } - if (ip->ip_off & htons(0x1fff)) { /* Can't deal w/ fragments */ + /* Can't deal with fragments */ + if (ip->ip_off & htons(IP_OFFS | IP_FLAGS_MFRAG)) { return; } /* can't deal with headers > 20 bytes */ @@ -1701,7 +1702,7 @@ NetSetIP(volatile uchar * xip, IPaddr_t dest, int dport, int sport, int len) ip->ip_tos = 0; ip->ip_len = htons(IP_HDR_SIZE + len); ip->ip_id = htons(NetIPID++); - ip->ip_off = htons(0x4000); /* No fragmentation */ + ip->ip_off = htons(IP_FLAGS_DFRAG); /* Don't fragment */ ip->ip_ttl = 255; ip->ip_p = 17; /* UDP */ ip->ip_sum = 0; diff --git a/net/tftp.c b/net/tftp.c index ce6ea3d9f5a..3dac3d8531b 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -499,9 +499,8 @@ TftpStart (void) strncpy(tftp_filename, BootFile, MAX_LEN); tftp_filename[MAX_LEN-1] = 0; } else { - *p++ = '\0'; TftpServerIP = string_to_ip (BootFile); - strncpy(tftp_filename, p, MAX_LEN); + strncpy(tftp_filename, p + 1, MAX_LEN); tftp_filename[MAX_LEN-1] = 0; } } |