summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
diff options
context:
space:
mode:
authorAndrej Valek <andrej.valek@siemens.com>2017-10-03 17:38:52 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-05 22:33:21 +0000
commit3bbc1577d92d2e56354a34a774e702418c82c2aa (patch)
tree8297b0b46c3fb5cc67a84cee4d489a36dfc31858 /meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
parent7515e9f0bca31aaaf7460701101baf22808fd46a (diff)
downloadpoky-3bbc1577d92d2e56354a34a774e702418c82c2aa.tar.gz
busybox: 1.24.1 -> 1.27.2
- fixed link creation to shell - reported bug with suid shells [https://bugs.busybox.net/show_bug.cgi?id=10346] - removed and modified already merged patches - updated defconfig regarding to new version (From OE-Core rev: 55740077a1f3bed5956fe02ef17ba1d99176ea24) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Radovan Scasny <radovan.scasny@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch')
-rw-r--r--meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch68
1 files changed, 34 insertions, 34 deletions
diff --git a/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch b/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
index 4c9ce3b711..582a258939 100644
--- a/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
+++ b/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
@@ -28,24 +28,23 @@ Fixed options -b, -a and -P.
28 28
29Signed-off-by: Andreas Oberritter <obi@opendreambox.org> 29Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
30--- 30---
31 networking/udhcp/dhcpc.c | 29 +++++++++++++++++++++-------- 31 networking/udhcp/dhcpc.c | 29 ++++++++++++++++------
32 1 files changed, 21 insertions(+), 8 deletions(-) 32 1 file changed, 21 insertions(+), 8 deletions(-)
33 33
34Index: busybox-1.20.2/networking/udhcp/dhcpc.c 34Index: busybox-1.27.2/networking/udhcp/dhcpc.c
35=================================================================== 35===================================================================
36--- busybox-1.20.2.orig/networking/udhcp/dhcpc.c 36--- busybox-1.27.2.orig/networking/udhcp/dhcpc.c
37+++ busybox-1.20.2/networking/udhcp/dhcpc.c 37+++ busybox-1.27.2/networking/udhcp/dhcpc.c
38@@ -29,6 +29,9 @@ 38@@ -49,6 +49,8 @@ struct tpacket_auxdata {
39 #include <netpacket/packet.h> 39 };
40 #include <linux/filter.h> 40 #endif
41 41
42+/* option whether to down the interface when reconfiguring */ 42+/* option whether to down the interface when reconfiguring */
43+static int allow_deconfig = 1; 43+static int allow_deconfig = 1;
44+
45 /* "struct client_config_t client_config" is in bb_common_bufsiz1 */
46 44
45 /* "struct client_config_t client_config" is in bb_common_bufsiz1 */
47 46
48@@ -81,8 +84,9 @@ enum { 47@@ -104,8 +106,9 @@ enum {
49 OPT_x = 1 << 18, 48 OPT_x = 1 << 18,
50 OPT_f = 1 << 19, 49 OPT_f = 1 << 19,
51 OPT_B = 1 << 20, 50 OPT_B = 1 << 20,
@@ -56,7 +55,7 @@ Index: busybox-1.20.2/networking/udhcp/dhcpc.c
56 USE_FOR_MMU( OPTBIT_b,) 55 USE_FOR_MMU( OPTBIT_b,)
57 IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,) 56 IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,)
58 IF_FEATURE_UDHCP_PORT( OPTBIT_P,) 57 IF_FEATURE_UDHCP_PORT( OPTBIT_P,)
59@@ -1040,7 +1044,8 @@ static void perform_renew(void) 58@@ -1110,7 +1113,8 @@ static void perform_renew(void)
60 state = RENEW_REQUESTED; 59 state = RENEW_REQUESTED;
61 break; 60 break;
62 case RENEW_REQUESTED: /* impatient are we? fine, square 1 */ 61 case RENEW_REQUESTED: /* impatient are we? fine, square 1 */
@@ -66,36 +65,37 @@ Index: busybox-1.20.2/networking/udhcp/dhcpc.c
66 case REQUESTING: 65 case REQUESTING:
67 case RELEASED: 66 case RELEASED:
68 change_listen_mode(LISTEN_RAW); 67 change_listen_mode(LISTEN_RAW);
69@@ -1064,7 +1069,8 @@ static void perform_release(uint32_t ser 68@@ -1146,7 +1150,8 @@ static void perform_release(uint32_t server_addr, uint32_t requested_ip)
70 bb_info_msg("Unicasting a release of %s to %s", 69 * Users requested to be notified in all cases, even if not in one
71 inet_ntoa(temp_addr), buffer); 70 * of the states above.
72 send_release(server_addr, requested_ip); /* unicast */ 71 */
73- udhcp_run_script(NULL, "deconfig"); 72- udhcp_run_script(NULL, "deconfig");
74+ if (allow_deconfig) 73+ if (allow_deconfig)
75+ udhcp_run_script(NULL, "deconfig"); 74+ udhcp_run_script(NULL, "deconfig");
76 }
77 bb_info_msg("Entering released state");
78 75
79@@ -1215,7 +1221,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c 76 change_listen_mode(LISTEN_NONE);
77 state = RELEASED;
78@@ -1298,7 +1303,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
80 /* O,x: list; -T,-t,-A take numeric param */ 79 /* O,x: list; -T,-t,-A take numeric param */
81 opt_complementary = "O::x::T+:t+:A+" IF_UDHCP_VERBOSE(":vv") ; 80 IF_UDHCP_VERBOSE(opt_complementary = "vv";)
82 IF_LONG_OPTS(applet_long_options = udhcpc_longopts;) 81 IF_LONG_OPTS(applet_long_options = udhcpc_longopts;)
83- opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:t:SA:O:ox:fB" 82- opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fB"
84+ opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:t:SA:O:ox:fBD" 83+ opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fBD"
85 USE_FOR_MMU("b") 84 USE_FOR_MMU("b")
86 IF_FEATURE_UDHCPC_ARPING("a") 85 IF_FEATURE_UDHCPC_ARPING("a::")
87 IF_FEATURE_UDHCP_PORT("P:") 86 IF_FEATURE_UDHCP_PORT("P:")
88@@ -1316,6 +1322,9 @@ int udhcpc_main(int argc UNUSED_PARAM, c 87@@ -1409,6 +1414,10 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
89 logmode |= LOGMODE_SYSLOG; 88 logmode |= LOGMODE_SYSLOG;
90 } 89 }
91 90
92+ if (opt & OPT_D) 91+ if (opt & OPT_D) {
93+ allow_deconfig = 0; 92+ allow_deconfig = 0;
93+ }
94+ 94+
95 /* Make sure fd 0,1,2 are open */ 95 /* Make sure fd 0,1,2 are open */
96 bb_sanitize_stdio(); 96 bb_sanitize_stdio();
97 /* Equivalent of doing a fflush after every \n */ 97 /* Equivalent of doing a fflush after every \n */
98@@ -1330,7 +1339,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c 98@@ -1423,7 +1432,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
99 srand(monotonic_us()); 99 srand(monotonic_us());
100 100
101 state = INIT_SELECTING; 101 state = INIT_SELECTING;
@@ -105,17 +105,17 @@ Index: busybox-1.20.2/networking/udhcp/dhcpc.c
105 change_listen_mode(LISTEN_RAW); 105 change_listen_mode(LISTEN_RAW);
106 packet_num = 0; 106 packet_num = 0;
107 timeout = 0; 107 timeout = 0;
108@@ -1484,7 +1494,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c 108@@ -1577,7 +1587,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
109 } 109 }
110 /* Timed out, enter init state */ 110 /* Timed out, enter init state */
111 bb_info_msg("Lease lost, entering init state"); 111 bb_error_msg("lease lost, entering init state");
112- udhcp_run_script(NULL, "deconfig"); 112- udhcp_run_script(NULL, "deconfig");
113+ if (allow_deconfig) 113+ if (allow_deconfig)
114+ udhcp_run_script(NULL, "deconfig"); 114+ udhcp_run_script(NULL, "deconfig");
115 state = INIT_SELECTING; 115 state = INIT_SELECTING;
116 client_config.first_secs = 0; /* make secs field count from 0 */ 116 client_config.first_secs = 0; /* make secs field count from 0 */
117 /*timeout = 0; - already is */ 117 /*timeout = 0; - already is */
118@@ -1667,7 +1678,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c 118@@ -1770,7 +1781,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
119 send_decline(/*xid,*/ server_addr, packet.yiaddr); 119 send_decline(/*xid,*/ server_addr, packet.yiaddr);
120 120
121 if (state != REQUESTING) 121 if (state != REQUESTING)
@@ -125,8 +125,8 @@ Index: busybox-1.20.2/networking/udhcp/dhcpc.c
125 change_listen_mode(LISTEN_RAW); 125 change_listen_mode(LISTEN_RAW);
126 state = INIT_SELECTING; 126 state = INIT_SELECTING;
127 client_config.first_secs = 0; /* make secs field count from 0 */ 127 client_config.first_secs = 0; /* make secs field count from 0 */
128@@ -1711,7 +1723,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c 128@@ -1840,7 +1852,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
129 bb_info_msg("Received DHCP NAK"); 129 bb_error_msg("received %s", "DHCP NAK");
130 udhcp_run_script(&packet, "nak"); 130 udhcp_run_script(&packet, "nak");
131 if (state != REQUESTING) 131 if (state != REQUESTING)
132- udhcp_run_script(NULL, "deconfig"); 132- udhcp_run_script(NULL, "deconfig");