aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-03-05 23:38:54 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-03-05 23:38:54 +0100
commitcbcc1236f806f18e6386e6e1f495a9832b7d307d (patch)
tree57679535a2d1ac60a6f2b3a21dc6afa9028b0cc0 /networking
parent4b1100edd8180efa2e81860ef2fadeebcb21f5fa (diff)
downloadbusybox-cbcc1236f806f18e6386e6e1f495a9832b7d307d.tar.gz
tftp: do not show progress bar if we get error right away. +13 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/Config.in7
-rw-r--r--networking/dnsd.c10
-rw-r--r--networking/tftp.c3
3 files changed, 12 insertions, 8 deletions
diff --git a/networking/Config.in b/networking/Config.in
index 90d905ee6..b01c38e51 100644
--- a/networking/Config.in
+++ b/networking/Config.in
@@ -860,7 +860,7 @@ config TFTPD
or from udpsvd. Example: "udpsvd -E 0 69 tftpd DIR"
config FEATURE_TFTP_GET
- bool "Enable \"get\" command"
+ bool "Enable 'tftp get' and/or tftpd upload code"
default y
depends on TFTP || TFTPD
help
@@ -868,8 +868,11 @@ config FEATURE_TFTP_GET
a client to retrieve a file from a TFTP server.
Also enable upload support in tftpd, if tftpd is selected.
+ Note: this option does _not_ make tftpd capable of download
+ (the usual operation people need from it)!
+
config FEATURE_TFTP_PUT
- bool "Enable \"put\" command"
+ bool "Enable 'tftp put' and/or tftpd download code"
default y
depends on TFTP || TFTPD
help
diff --git a/networking/dnsd.c b/networking/dnsd.c
index e73e244b0..6771c5346 100644
--- a/networking/dnsd.c
+++ b/networking/dnsd.c
@@ -376,11 +376,6 @@ static int process_packet(struct dns_entry *conf_data,
/* QR = 1 "response", RCODE = 4 "Not Implemented" */
outr_flags = htons(0x8000 | 4);
err_msg = NULL;
- /* OPCODE != 0 "standard query" ? */
- if ((head->flags & htons(0x7800)) != 0) {
- err_msg = "opcode != 0";
- goto empty_packet;
- }
/* start of query string */
query_string = (void *)(head + 1);
@@ -392,6 +387,11 @@ static int process_packet(struct dns_entry *conf_data,
/* where to append answer block */
answb = (void *)(unaligned_type_class + 1);
+ /* OPCODE != 0 "standard query"? */
+ if ((head->flags & htons(0x7800)) != 0) {
+ err_msg = "opcode != 0";
+ goto empty_packet;
+ }
move_from_unaligned16(class, &unaligned_type_class->class);
if (class != htons(1)) { /* not class INET? */
err_msg = "class != 1";
diff --git a/networking/tftp.c b/networking/tftp.c
index 0e5b48d40..d76f7ae5b 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -135,7 +135,8 @@ static void tftp_progress_init(void)
}
static void tftp_progress_done(void)
{
- progress_meter(0);
+ if (G.pmt.inited)
+ progress_meter(0);
}
#else
# define tftp_progress_init() ((void)0)