summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorpst <pst@FreeBSD.org>1995-04-26 16:52:40 +0000
committerpst <pst@FreeBSD.org>1995-04-26 16:52:40 +0000
commita153267748ead18b28287e3a1a46a720b15d4f8a (patch)
tree4c4ff372164b048b6f1d4e598bbee0f6571b0329 /sbin
parent212277584eda418a61b70f12467a9b773b931f5a (diff)
downloadFreeBSD-src-a153267748ead18b28287e3a1a46a720b15d4f8a.zip
FreeBSD-src-a153267748ead18b28287e3a1a46a720b15d4f8a.tar.gz
Replace call to obsolete inet_addr routine with inet_aton so we can specify
netmasks and broadcast addresses of 255.255.255.255.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ifconfig/ifconfig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index f62761c..675cf66 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -750,8 +750,8 @@ in_getaddr(s, which)
if (which != MASK)
sin->sin_family = AF_INET;
- if ((val = inet_addr(s)) != -1)
- sin->sin_addr.s_addr = val;
+ if (inet_aton(s, &sin->sin_addr))
+ ;
else if (hp = gethostbyname(s))
bcopy(hp->h_addr, (char *)&sin->sin_addr, hp->h_length);
else if (np = getnetbyname(s))
OpenPOWER on IntegriCloud