summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
diff options
context:
space:
mode:
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.patch48
1 files changed, 27 insertions, 21 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 582a258939..76daaf1f02 100644
--- a/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
+++ b/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
@@ -31,11 +31,11 @@ Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
31 networking/udhcp/dhcpc.c | 29 ++++++++++++++++------ 31 networking/udhcp/dhcpc.c | 29 ++++++++++++++++------
32 1 file changed, 21 insertions(+), 8 deletions(-) 32 1 file changed, 21 insertions(+), 8 deletions(-)
33 33
34Index: busybox-1.27.2/networking/udhcp/dhcpc.c 34Index: busybox-1.29.1/networking/udhcp/dhcpc.c
35=================================================================== 35===================================================================
36--- busybox-1.27.2.orig/networking/udhcp/dhcpc.c 36--- busybox-1.29.1.orig/networking/udhcp/dhcpc.c
37+++ busybox-1.27.2/networking/udhcp/dhcpc.c 37+++ busybox-1.29.1/networking/udhcp/dhcpc.c
38@@ -49,6 +49,8 @@ struct tpacket_auxdata { 38@@ -48,6 +48,8 @@
39 }; 39 };
40 #endif 40 #endif
41 41
@@ -44,7 +44,7 @@ Index: busybox-1.27.2/networking/udhcp/dhcpc.c
44 44
45 /* "struct client_config_t client_config" is in bb_common_bufsiz1 */ 45 /* "struct client_config_t client_config" is in bb_common_bufsiz1 */
46 46
47@@ -104,8 +106,9 @@ enum { 47@@ -103,8 +105,9 @@
48 OPT_x = 1 << 18, 48 OPT_x = 1 << 18,
49 OPT_f = 1 << 19, 49 OPT_f = 1 << 19,
50 OPT_B = 1 << 20, 50 OPT_B = 1 << 20,
@@ -55,7 +55,7 @@ Index: busybox-1.27.2/networking/udhcp/dhcpc.c
55 USE_FOR_MMU( OPTBIT_b,) 55 USE_FOR_MMU( OPTBIT_b,)
56 IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,) 56 IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,)
57 IF_FEATURE_UDHCP_PORT( OPTBIT_P,) 57 IF_FEATURE_UDHCP_PORT( OPTBIT_P,)
58@@ -1110,7 +1113,8 @@ static void perform_renew(void) 58@@ -1116,7 +1119,8 @@
59 state = RENEW_REQUESTED; 59 state = RENEW_REQUESTED;
60 break; 60 break;
61 case RENEW_REQUESTED: /* impatient are we? fine, square 1 */ 61 case RENEW_REQUESTED: /* impatient are we? fine, square 1 */
@@ -65,7 +65,7 @@ Index: busybox-1.27.2/networking/udhcp/dhcpc.c
65 case REQUESTING: 65 case REQUESTING:
66 case RELEASED: 66 case RELEASED:
67 change_listen_mode(LISTEN_RAW); 67 change_listen_mode(LISTEN_RAW);
68@@ -1146,7 +1150,8 @@ static void perform_release(uint32_t server_addr, uint32_t requested_ip) 68@@ -1152,7 +1156,8 @@
69 * Users requested to be notified in all cases, even if not in one 69 * Users requested to be notified in all cases, even if not in one
70 * of the states above. 70 * of the states above.
71 */ 71 */
@@ -75,16 +75,16 @@ Index: busybox-1.27.2/networking/udhcp/dhcpc.c
75 75
76 change_listen_mode(LISTEN_NONE); 76 change_listen_mode(LISTEN_NONE);
77 state = RELEASED; 77 state = RELEASED;
78@@ -1298,7 +1303,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) 78@@ -1265,7 +1270,7 @@
79 /* O,x: list; -T,-t,-A take numeric param */ 79 /* Parse command line */
80 IF_UDHCP_VERBOSE(opt_complementary = "vv";) 80 opt = getopt32long(argv, "^"
81 IF_LONG_OPTS(applet_long_options = udhcpc_longopts;) 81 /* O,x: list; -T,-t,-A take numeric param */
82- opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fB" 82- "CV:H:h:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fB"
83+ opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fBD" 83+ "CV:H:h:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fBD"
84 USE_FOR_MMU("b") 84 USE_FOR_MMU("b")
85 IF_FEATURE_UDHCPC_ARPING("a::") 85 IF_FEATURE_UDHCPC_ARPING("a::")
86 IF_FEATURE_UDHCP_PORT("P:") 86 IF_FEATURE_UDHCP_PORT("P:")
87@@ -1409,6 +1414,10 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) 87@@ -1376,6 +1381,10 @@
88 logmode |= LOGMODE_SYSLOG; 88 logmode |= LOGMODE_SYSLOG;
89 } 89 }
90 90
@@ -94,8 +94,8 @@ Index: busybox-1.27.2/networking/udhcp/dhcpc.c
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 /* Create pidfile */
98@@ -1423,7 +1432,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) 98@@ -1388,7 +1397,8 @@
99 srand(monotonic_us()); 99 srand(monotonic_us());
100 100
101 state = INIT_SELECTING; 101 state = INIT_SELECTING;
@@ -105,7 +105,7 @@ Index: busybox-1.27.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@@ -1577,7 +1587,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) 108@@ -1555,7 +1565,8 @@
109 } 109 }
110 /* Timed out, enter init state */ 110 /* Timed out, enter init state */
111 bb_error_msg("lease lost, entering init state"); 111 bb_error_msg("lease lost, entering init state");
@@ -115,23 +115,29 @@ Index: busybox-1.27.2/networking/udhcp/dhcpc.c
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@@ -1770,7 +1781,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) 118@@ -1748,8 +1759,10 @@
119 "(got ARP reply), declining");
119 send_decline(/*xid,*/ server_addr, packet.yiaddr); 120 send_decline(/*xid,*/ server_addr, packet.yiaddr);
120 121
121 if (state != REQUESTING) 122- if (state != REQUESTING)
122- udhcp_run_script(NULL, "deconfig"); 123- udhcp_run_script(NULL, "deconfig");
124+ if (state != REQUESTING) {
123+ if (allow_deconfig) 125+ if (allow_deconfig)
124+ udhcp_run_script(NULL, "deconfig"); 126+ udhcp_run_script(NULL, "deconfig");
127+ }
125 change_listen_mode(LISTEN_RAW); 128 change_listen_mode(LISTEN_RAW);
126 state = INIT_SELECTING; 129 state = INIT_SELECTING;
127 client_config.first_secs = 0; /* make secs field count from 0 */ 130 client_config.first_secs = 0; /* make secs field count from 0 */
128@@ -1840,7 +1852,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) 131@@ -1818,8 +1831,10 @@
132 /* return to init state */
129 bb_error_msg("received %s", "DHCP NAK"); 133 bb_error_msg("received %s", "DHCP NAK");
130 udhcp_run_script(&packet, "nak"); 134 udhcp_run_script(&packet, "nak");
131 if (state != REQUESTING) 135- if (state != REQUESTING)
132- udhcp_run_script(NULL, "deconfig"); 136- udhcp_run_script(NULL, "deconfig");
137+ if (state != REQUESTING) {
133+ if (allow_deconfig) 138+ if (allow_deconfig)
134+ udhcp_run_script(NULL, "deconfig"); 139+ udhcp_run_script(NULL, "deconfig");
140+ }
135 change_listen_mode(LISTEN_RAW); 141 change_listen_mode(LISTEN_RAW);
136 sleep(3); /* avoid excessive network traffic */ 142 sleep(3); /* avoid excessive network traffic */
137 state = INIT_SELECTING; 143 state = INIT_SELECTING;