|
@@ -1341,7 +1341,7 @@ static int net_check_prereq(enum proto_t protocol)
|
|
|
/* Fall through */
|
|
|
case TFTPGET:
|
|
|
case TFTPPUT:
|
|
|
- if (net_server_ip.s_addr == 0) {
|
|
|
+ if (net_server_ip.s_addr == 0 && !is_serverip_in_cmd()) {
|
|
|
puts("*** ERROR: `serverip' not set\n");
|
|
|
return 1;
|
|
|
}
|
|
@@ -1512,6 +1512,11 @@ void copy_filename(char *dst, const char *src, int size)
|
|
|
*dst = '\0';
|
|
|
}
|
|
|
|
|
|
+int is_serverip_in_cmd(void)
|
|
|
+{
|
|
|
+ return !!strchr(net_boot_file_name, ':');
|
|
|
+}
|
|
|
+
|
|
|
#if defined(CONFIG_CMD_NFS) || \
|
|
|
defined(CONFIG_CMD_SNTP) || \
|
|
|
defined(CONFIG_CMD_DNS)
|