summaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r--networking/udhcp/dhcpc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index bc0676152..fb328cb03 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -182,6 +182,7 @@ int udhcpc_main(int argc ATTRIBUTE_UNUSED, char **argv)
182 OPT_W = 1 << 21, 182 OPT_W = 1 << 21,
183#endif 183#endif
184 OPT_P = 1 << 22, 184 OPT_P = 1 << 22,
185 OPT_o = 1 << 23,
185 }; 186 };
186#if ENABLE_GETOPT_LONG 187#if ENABLE_GETOPT_LONG
187 static const char udhcpc_longopts[] ALIGN1 = 188 static const char udhcpc_longopts[] ALIGN1 =
@@ -211,6 +212,7 @@ int udhcpc_main(int argc ATTRIBUTE_UNUSED, char **argv)
211#if ENABLE_FEATURE_UDHCP_PORT 212#if ENABLE_FEATURE_UDHCP_PORT
212 "client-port\0" Required_argument "P" 213 "client-port\0" Required_argument "P"
213#endif 214#endif
215 "no-default-options\0" No_argument "o"
214 ; 216 ;
215#endif 217#endif
216 /* Default options. */ 218 /* Default options. */
@@ -230,7 +232,7 @@ int udhcpc_main(int argc ATTRIBUTE_UNUSED, char **argv)
230 opt = getopt32(argv, "c:CV:fbH:h:F:i:np:qRr:s:T:t:vSA:" 232 opt = getopt32(argv, "c:CV:fbH:h:F:i:np:qRr:s:T:t:vSA:"
231 USE_FEATURE_UDHCPC_ARPING("aW:") 233 USE_FEATURE_UDHCPC_ARPING("aW:")
232 USE_FEATURE_UDHCP_PORT("P:") 234 USE_FEATURE_UDHCP_PORT("P:")
233 "O:" 235 "O:o"
234 , &str_c, &str_V, &str_h, &str_h, &str_F 236 , &str_c, &str_V, &str_h, &str_h, &str_F
235 , &client_config.interface, &client_config.pidfile, &str_r 237 , &client_config.interface, &client_config.pidfile, &str_r
236 , &client_config.script 238 , &client_config.script
@@ -291,6 +293,8 @@ int udhcpc_main(int argc ATTRIBUTE_UNUSED, char **argv)
291 SERVER_PORT = CLIENT_PORT - 1; 293 SERVER_PORT = CLIENT_PORT - 1;
292 } 294 }
293#endif 295#endif
296 if (opt & OPT_o)
297 client_config.no_default_options = 1;
294 while (list_O) { 298 while (list_O) {
295 int n = index_in_strings(dhcp_option_strings, list_O->data); 299 int n = index_in_strings(dhcp_option_strings, list_O->data);
296 if (n < 0) 300 if (n < 0)