diff options
Diffstat (limited to 'networking/arping.c')
-rw-r--r-- | networking/arping.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/networking/arping.c b/networking/arping.c index 6a17b18ee..39dcb7cc2 100644 --- a/networking/arping.c +++ b/networking/arping.c | |||
@@ -264,16 +264,14 @@ int arping_main(int argc ATTRIBUTE_UNUSED, char **argv) | |||
264 | err_str = xasprintf("interface %s %%s", device); | 264 | err_str = xasprintf("interface %s %%s", device); |
265 | { | 265 | { |
266 | unsigned opt; | 266 | unsigned opt; |
267 | char *str_count, *str_timeout; | 267 | char *str_timeout; |
268 | 268 | ||
269 | /* Dad also sets quit_on_reply. | 269 | /* Dad also sets quit_on_reply. |
270 | * Advert also sets unsolicited. | 270 | * Advert also sets unsolicited. |
271 | */ | 271 | */ |
272 | opt_complementary = "=1:Df:AU"; | 272 | opt_complementary = "=1:Df:AU:c+"; |
273 | opt = getopt32(argv, "DUAqfbc:w:I:s:", | 273 | opt = getopt32(argv, "DUAqfbc:w:I:s:", |
274 | &str_count, &str_timeout, &device, &source); | 274 | &count, &str_timeout, &device, &source); |
275 | if (opt & 0x40) /* -c: count */ | ||
276 | count = xatoi_u(str_count); | ||
277 | if (opt & 0x80) /* -w: timeout */ | 275 | if (opt & 0x80) /* -w: timeout */ |
278 | timeout_us = xatou_range(str_timeout, 0, INT_MAX/2000000) * 1000000 + 500000; | 276 | timeout_us = xatou_range(str_timeout, 0, INT_MAX/2000000) * 1000000 + 500000; |
279 | //if (opt & 0x200) /* -s: source */ | 277 | //if (opt & 0x200) /* -s: source */ |