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.patch143
1 files changed, 0 insertions, 143 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
deleted file mode 100644
index 35e981d6a2..0000000000
--- a/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
+++ /dev/null
@@ -1,143 +0,0 @@
1From 53626cd06a3ef05ed847daea802ef0aa9661caa7 Mon Sep 17 00:00:00 2001
2From: Anders Darander <anders@chargestorm.se>
3Date: Thu, 3 Nov 2011 08:51:31 +0100
4Subject: [PATCH] busybox-udhcpc-no_deconfig.patch
5
6Upstream-Status: Pending
7
8Add a new option -D to the udhcpc client that allows for
9dhcp renewal to occur without having to down the interface
10in the process.
11
12Signed-off-by: Greg Moffatt <greg.moffatt@windriver.com>
13
14Updated to latest Busybox 1.17.3
15
16Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
17
18Updated to Busybox 1.18.4
19option spec is changed
20
21Signed-off-by: Qing He <qing.he@intel.com>
22
23Updated to Busybox 1.19.3
24
25Signed-off-by: Anders Darander <anders@chargestorm.se>
26
27Fixed options -b, -a and -P.
28
29Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
30---
31 networking/udhcp/dhcpc.c | 29 ++++++++++++++++------
32 1 file changed, 21 insertions(+), 8 deletions(-)
33
34Index: busybox-1.32.0/networking/udhcp/dhcpc.c
35===================================================================
36--- busybox-1.32.0.orig/networking/udhcp/dhcpc.c
37+++ busybox-1.32.0/networking/udhcp/dhcpc.c
38@@ -48,6 +48,8 @@ struct tpacket_auxdata {
39 };
40 #endif
41
42+/* option whether to down the interface when reconfiguring */
43+static int allow_deconfig = 1;
44
45 /* "struct client_data_t client_data" is in bb_common_bufsiz1 */
46
47@@ -103,8 +105,10 @@
48 OPT_x = 1 << 18,
49 OPT_f = 1 << 19,
50 OPT_B = 1 << 20,
51+ OPT_D = 1 << 21,
52 /* The rest has variable bit positions, need to be clever */
53 OPTBIT_B = 20,
54+ OPTBIT_D = 21,
55 USE_FOR_MMU( OPTBIT_b,)
56 IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,)
57 IF_FEATURE_UDHCP_PORT( OPTBIT_P,)
58@@ -1084,7 +1088,8 @@
59 client_data.state = RENEW_REQUESTED;
60 break;
61 case RENEW_REQUESTED: /* impatient are we? fine, square 1 */
62- udhcp_run_script(NULL, "deconfig");
63+ if (allow_deconfig)
64+ udhcp_run_script(NULL, "deconfig");
65 case REQUESTING:
66 case RELEASED:
67 change_listen_mode(LISTEN_RAW);
68@@ -1120,7 +1125,8 @@ static void perform_release(uint32_t server_addr, uint32_t requested_ip)
69 * Users requested to be notified in all cases, even if not in one
70 * of the states above.
71 */
72- udhcp_run_script(NULL, "deconfig");
73+ if (allow_deconfig)
74+ udhcp_run_script(NULL, "deconfig");
75
76 change_listen_mode(LISTEN_NONE);
77 client_data.state = RELEASED;
78@@ -1238,7 +1244,7 @@
79 /* Parse command line */
80 opt = getopt32long(argv, "^"
81 /* O,x: list; -T,-t,-A take numeric param */
82- "CV:H:h:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fB"
83+ "CV:H:h:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fBD"
84 USE_FOR_MMU("b")
85 IF_FEATURE_UDHCPC_ARPING("a::")
86 IF_FEATURE_UDHCP_PORT("P:")
87@@ -1349,6 +1355,10 @@
88 logmode |= LOGMODE_SYSLOG;
89 }
90
91+ if (opt & OPT_D) {
92+ allow_deconfig = 0;
93+ }
94+
95 /* Create pidfile */
96 write_pidfile(client_data.pidfile);
97 /* Goes to stdout (unless NOMMU) and possibly syslog */
98@@ -1357,7 +1367,8 @@
99 srand(monotonic_us());
100
101 client_data.state = INIT_SELECTING;
102- udhcp_run_script(NULL, "deconfig");
103+ if (allow_deconfig)
104+ udhcp_run_script(NULL, "deconfig");
105 change_listen_mode(LISTEN_RAW);
106 packet_num = 0;
107 timeout = 0;
108@@ -1530,7 +1541,8 @@
109 }
110 /* Timed out, enter init state */
111 bb_simple_info_msg("lease lost, entering init state");
112- udhcp_run_script(NULL, "deconfig");
113+ if (allow_deconfig)
114+ udhcp_run_script(NULL, "deconfig");
115 client_data.state = INIT_SELECTING;
116 client_data.first_secs = 0; /* make secs field count from 0 */
117 /*timeout = 0; - already is */
118@@ -1722,8 +1734,10 @@
119 "(got ARP reply), declining");
120 send_decline(/*xid,*/ server_addr, packet.yiaddr);
121
122- if (client_data.state != REQUESTING)
123- udhcp_run_script(NULL, "deconfig");
124+ if (client_data.state != REQUESTING) {
125+ if (allow_deconfig)
126+ udhcp_run_script(NULL, "deconfig");
127+ }
128 change_listen_mode(LISTEN_RAW);
129 client_data.state = INIT_SELECTING;
130 client_data.first_secs = 0; /* make secs field count from 0 */
131@@ -1792,8 +1806,10 @@
132 /* return to init state */
133 bb_info_msg("received %s", "DHCP NAK");
134 udhcp_run_script(&packet, "nak");
135- if (client_data.state != REQUESTING)
136- udhcp_run_script(NULL, "deconfig");
137+ if (client_data.state != REQUESTING) {
138+ if (allow_deconfig)
139+ udhcp_run_script(NULL, "deconfig");
140+ }
141 change_listen_mode(LISTEN_RAW);
142 sleep(3); /* avoid excessive network traffic */
143 client_data.state = INIT_SELECTING;