summaryrefslogtreecommitdiff
path: root/package/busybox/patches/011-hotfixes.patch
blob: 53775ad4d1f876e4aedaec8823fbeef888d6649b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
diff -Nur busybox-1.25.0.orig/archival/gzip.c busybox-1.25.0/archival/gzip.c
--- busybox-1.25.0.orig/archival/gzip.c	2016-06-20 01:43:06.000000000 +0200
+++ busybox-1.25.0/archival/gzip.c	2016-09-07 17:12:42.763524056 +0200
@@ -2220,10 +2220,7 @@
 	opt >>= ENABLE_GUNZIP ? 7 : 5; /* drop cfv[dt]qn bits */
 	if (opt == 0)
 		opt = 1 << 6; /* default: 6 */
-	/* Map 1..3 to 4 */
-	if (opt & 0x7)
-		opt |= 1 << 4;
-	opt = ffs(opt >> 3);
+	opt = ffs(opt >> 4); /* Maps -1..-4 to [0], -5 to [1] ... -9 to [5] */
 	max_chain_length = 1 << gzip_level_config[opt].chain_shift;
 	good_match	 = gzip_level_config[opt].good;
 	max_lazy_match	 = gzip_level_config[opt].lazy2 * 2;
diff -Nur busybox-1.25.0.orig/networking/libiproute/iproute.c busybox-1.25.0/networking/libiproute/iproute.c
--- busybox-1.25.0.orig/networking/libiproute/iproute.c	2016-05-26 19:42:44.000000000 +0200
+++ busybox-1.25.0/networking/libiproute/iproute.c	2016-09-07 17:12:46.235747275 +0200
@@ -362,10 +362,9 @@
 		req.r.rtm_scope = RT_SCOPE_NOWHERE;
 
 	if (cmd != RTM_DELROUTE) {
+		req.r.rtm_scope = RT_SCOPE_UNIVERSE;
 		if (RTPROT_BOOT != 0)
 			req.r.rtm_protocol = RTPROT_BOOT;
-		if (RT_SCOPE_UNIVERSE != 0)
-			req.r.rtm_scope = RT_SCOPE_UNIVERSE;
 		if (RTN_UNICAST != 0)
 			req.r.rtm_type = RTN_UNICAST;
 	}
diff -Nur busybox-1.25.0.orig/networking/ntpd.c busybox-1.25.0/networking/ntpd.c
--- busybox-1.25.0.orig/networking/ntpd.c	2016-06-06 02:26:04.000000000 +0200
+++ busybox-1.25.0/networking/ntpd.c	2016-09-07 17:12:38.979280766 +0200
@@ -2051,6 +2051,13 @@
 		goto bail;
 	}
 
+	/* Respond only to client and symmetric active packets */
+	if ((msg.m_status & MODE_MASK) != MODE_CLIENT
+	 && (msg.m_status & MODE_MASK) != MODE_SYM_ACT
+	) {
+		goto bail;
+	}
+
 	query_status = msg.m_status;
 	query_xmttime = msg.m_xmttime;