Index: /src/router/busybox/.config_laguna
===================================================================
--- /src/router/busybox/.config_laguna	(revision 17725)
+++ /src/router/busybox/.config_laguna	(revision 17726)
@@ -813,5 +813,5 @@
 CONFIG_FEATURE_TFTP_PUT=y
 CONFIG_FEATURE_TFTP_BLOCKSIZE=y
-# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set
+CONFIG_FEATURE_TFTP_PROGRESS_BAR=y
 # CONFIG_TFTP_DEBUG is not set
 CONFIG_TRACEROUTE=y
Index: /src/router/busybox/applets/applet_tables.c
===================================================================
--- /src/router/busybox/applets/applet_tables.c	(revision 17725)
+++ /src/router/busybox/applets/applet_tables.c	(revision 17726)
@@ -81,6 +81,13 @@
 	printf("#define NUM_APPLETS %u\n", NUM_APPLETS);
 	if (NUM_APPLETS == 1) {
+		char *dash_to_underscore, *p;
 		printf("#define SINGLE_APPLET_STR \"%s\"\n", applets[0].name);
-		printf("#define SINGLE_APPLET_MAIN %s_main\n", applets[0].name);
+		/* Example: "ether-wake" -> "ether_wake" */
+		p = dash_to_underscore = strdup(applets[0].name);
+		p--;
+		while (*++p)
+			if (*p == '-')
+				*p = '_';
+		printf("#define SINGLE_APPLET_MAIN %s_main\n", dash_to_underscore);
 	}
 	printf("\n");
Index: /src/router/busybox/coreutils/tail.c
===================================================================
--- /src/router/busybox/coreutils/tail.c	(revision 17725)
+++ /src/router/busybox/coreutils/tail.c	(revision 17726)
@@ -204,5 +204,5 @@
 
 		if (ENABLE_FEATURE_FANCY_TAIL && fd < 0)
-			continue; /* may happen with -E */
+			continue; /* may happen with -F */
 
 		if (nfiles > header_threshhold) {
@@ -253,5 +253,5 @@
 		seen = 1;
 		newlines_seen = 0;
-		while ((nread = tail_read(fd, buf, tailbufsize-taillen)) > 0) {
+		while ((nread = tail_read(fd, buf, tailbufsize - taillen)) > 0) {
 			if (G.from_top) {
 				int nwrite = nread;
@@ -260,5 +260,5 @@
 					if (COUNT_BYTES) {
 						nwrite -= (count - seen);
-						seen = count;
+						seen += nread;
 					} else {
 						char *s = buf;
Index: /src/router/busybox/include/platform.h
===================================================================
--- /src/router/busybox/include/platform.h	(revision 17725)
+++ /src/router/busybox/include/platform.h	(revision 17726)
@@ -434,5 +434,5 @@
 #endif
 
-#if defined(ANDROID)
+#if defined(ANDROID) || defined(__ANDROID__)
 # undef HAVE_DPRINTF
 # undef HAVE_GETLINE
Index: /src/router/busybox/loginutils/chpasswd.c
===================================================================
--- /src/router/busybox/loginutils/chpasswd.c	(revision 17725)
+++ /src/router/busybox/loginutils/chpasswd.c	(revision 17726)
@@ -34,7 +34,6 @@
 int chpasswd_main(int argc UNUSED_PARAM, char **argv)
 {
-	char *name, *pass;
-	char salt[sizeof("$N$XXXXXXXX")];
-	int opt, rc;
+	char *name;
+	int opt;
 
 	if (getuid() != 0)
@@ -46,4 +45,8 @@
 
 	while ((name = xmalloc_fgetline(stdin)) != NULL) {
+		char *free_me;
+		char *pass;
+		int rc;
+
 		pass = strchr(name, ':');
 		if (!pass)
@@ -53,5 +56,8 @@
 		xuname2uid(name); /* dies if there is no such user */
 
+		free_me = NULL;
 		if (!(opt & OPT_ENC)) {
+			char salt[sizeof("$N$XXXXXXXX")];
+
 			crypt_make_salt(salt, 1);
 			if (opt & OPT_MD5) {
@@ -61,5 +67,5 @@
 				crypt_make_salt(salt + 3, 4);
 			}
-			pass = pw_encrypt(pass, salt, 0);
+			free_me = pass = pw_encrypt(pass, salt, 0);
 		}
 
@@ -82,6 +88,5 @@
 		logmode = LOGMODE_STDIO;
 		free(name);
-		if (!(opt & OPT_ENC))
-			free(pass);
+		free(free_me);
 	}
 	return EXIT_SUCCESS;
Index: /src/router/busybox/miscutils/crond.c
===================================================================
--- /src/router/busybox/miscutils/crond.c	(revision 17725)
+++ /src/router/busybox/miscutils/crond.c	(revision 17726)
@@ -862,5 +862,6 @@
 	/* "-b after -f is ignored", and so on for every pair a-b */
 	opt_complementary = "f-b:b-f:S-L:L-S" IF_FEATURE_CROND_D(":d-l")
-			":l+:d+"; /* -l and -d have numeric param */
+			/* -l and -d have numeric param */
+			":l+" IF_FEATURE_CROND_D(":d+");
 	opts = getopt32(argv, "l:L:fbSc:" IF_FEATURE_CROND_D("d:"),
 			&G.log_level, &G.log_filename, &G.crontab_dir_name
Index: /src/router/busybox/networking/inetd.c
===================================================================
--- /src/router/busybox/networking/inetd.c	(revision 17725)
+++ /src/router/busybox/networking/inetd.c	(revision 17726)
@@ -1279,4 +1279,5 @@
 							rearm_alarm(); /* will revive it in RETRYTIME sec */
 							restore_sigmask(&omask);
+							maybe_close(new_udp_fd);
 							maybe_close(accepted_fd);
 							continue; /* -> check next fd in fd set */
@@ -1299,4 +1300,5 @@
 					sleep(1);
 					restore_sigmask(&omask);
+					maybe_close(new_udp_fd);
 					maybe_close(accepted_fd);
 					continue; /* -> check next fd in fd set */
@@ -1305,9 +1307,9 @@
 					pid--; /* -1: "we did fork and we are child" */
 			}
-			/* if pid == 0 here, we never forked */
+			/* if pid == 0 here, we didn't fork */
 
 			if (pid > 0) { /* parent */
 				if (sep->se_wait) {
-					/* tcp wait: we passed listening socket to child,
+					/* wait: we passed socket to child,
 					 * will wait for child to terminate */
 					sep->se_wait = pid;
@@ -1346,7 +1348,11 @@
 			/* "nowait" udp */
 			if (new_udp_fd >= 0) {
-				len_and_sockaddr *lsa = xzalloc_lsa(sep->se_family);
+				len_and_sockaddr *lsa;
+				int r;
+
+				close(new_udp_fd);
+				lsa = xzalloc_lsa(sep->se_family);
 				/* peek at the packet and remember peer addr */
-				int r = recvfrom(ctrl, NULL, 0, MSG_PEEK|MSG_DONTWAIT,
+				r = recvfrom(ctrl, NULL, 0, MSG_PEEK|MSG_DONTWAIT,
 					&lsa->u.sa, &lsa->len);
 				if (r < 0)
Index: /src/router/busybox/networking/tftp.c
===================================================================
--- /src/router/busybox/networking/tftp.c	(revision 17725)
+++ /src/router/busybox/networking/tftp.c	(revision 17726)
@@ -814,5 +814,6 @@
 	}
 	mode = local_file + strlen(local_file) + 1;
-	if (mode >= block_buf + result || strcmp(mode, "octet") != 0) {
+	/* RFC 1350 says mode string is case independent */
+	if (mode >= block_buf + result || strcasecmp(mode, "octet") != 0) {
 		goto err;
 	}
Index: /src/router/busybox/sysklogd/syslogd.c
===================================================================
--- /src/router/busybox/sysklogd/syslogd.c	(revision 17725)
+++ /src/router/busybox/sysklogd/syslogd.c	(revision 17726)
@@ -279,5 +279,5 @@
 
 	parser = config_open2(file ? file : "/etc/syslog.conf",
-				file ? xfopen_for_read : fopen_or_warn_stdin);
+				file ? xfopen_for_read : fopen_for_read);
 	if (!parser)
 		/* didn't find default /etc/syslog.conf */
@@ -679,5 +679,5 @@
 #if ENABLE_FEATURE_IPC_SYSLOG
 		if ((option_mask32 & OPT_circularlog) && G.shbuf) {
-			log_to_shmem(msg);
+			log_to_shmem(G.printbuf);
 			return;
 		}
Index: /src/router/busybox/testsuite/tail.tests
===================================================================
--- /src/router/busybox/testsuite/tail.tests	(revision 17725)
+++ /src/router/busybox/testsuite/tail.tests	(revision 17726)
@@ -15,3 +15,11 @@
 	"" "qw"
 
+testing "tail: -c +N with largish N" \
+	"
+	dd if=/dev/zero bs=16k count=1 2>/dev/null | tail -c +8200 | wc -c;
+	dd if=/dev/zero bs=16k count=1 2>/dev/null | tail -c +8208 | wc -c;
+	" \
+	"8185\n8177\n" \
+	"" ""
+
 exit $FAILCOUNT
