diff options
author | Eric Andersen | 2001-11-10 11:22:46 +0000 |
---|---|---|
committer | Eric Andersen | 2001-11-10 11:22:46 +0000 |
commit | cd8c436d811a5a077a0b61a6616c900173e2dcfb (patch) | |
tree | 94163bfef63fec4c2638d5f56be310b7176464d7 /networking/ifconfig.c | |
parent | 94f19a838518293810a0fc0c4dca926ca8caff57 (diff) | |
download | busybox-cd8c436d811a5a077a0b61a6616c900173e2dcfb.zip busybox-cd8c436d811a5a077a0b61a6616c900173e2dcfb.tar.gz |
Latest patch from vodz:
-- reverse resolve network name and cache in route and ifconfig
applets, fix print nslookup server name if compile without
uClibc, fix route crashe 'route add', fix warnings compile
networking and pwd_grp applets
Diffstat (limited to 'networking/ifconfig.c')
-rw-r--r-- | networking/ifconfig.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/networking/ifconfig.c b/networking/ifconfig.c index fe154cf..0b834e7 100644 --- a/networking/ifconfig.c +++ b/networking/ifconfig.c @@ -15,7 +15,7 @@ * Foundation; either version 2 of the License, or (at * your option) any later version. * - * $Id: ifconfig.c,v 1.15 2001/10/28 09:36:48 andersen Exp $ + * $Id: ifconfig.c,v 1.16 2001/11/10 11:22:43 andersen Exp $ * */ @@ -34,14 +34,12 @@ #include <string.h> // strcmp and friends #include <ctype.h> // isdigit and friends #include <stddef.h> /* offsetof */ -#include <sys/types.h> -#include <sys/socket.h> #include <sys/ioctl.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <net/if.h> #include <net/if_arp.h> +#include <netinet/in.h> #include <linux/if_ether.h> +#include <net/if.h> +#include "inet_common.h" #include "busybox.h" #ifdef CONFIG_FEATURE_IFCONFIG_SLIP @@ -339,7 +337,7 @@ int ifconfig_main(int argc, char **argv) safe_strncpy(host, *argv, (sizeof host)); sai.sin_family = AF_INET; sai.sin_port = 0; - if (!strcmp(host, "default")) { + if (!strcmp(host, bb_INET_default)) { /* Default is special, meaning 0.0.0.0. */ sai.sin_addr.s_addr = INADDR_ANY; } else if (inet_aton(host, &sai.sin_addr) == 0) { |