summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient/parse.c
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2012-11-08 21:32:55 +0000
committerkrw <krw@openbsd.org>2012-11-08 21:32:55 +0000
commitb21b72f817061283a7f1b51f02cae2d0500bfaac (patch)
treed63c6b33b66268b52255295e22a71e4ecc333ebe /sbin/dhclient/parse.c
parentRemove lie about dhclient configuring all interfaces. Mention (diff)
downloadwireguard-openbsd-b21b72f817061283a7f1b51f02cae2d0500bfaac.tar.xz
wireguard-openbsd-b21b72f817061283a7f1b51f02cae2d0500bfaac.zip
Remove confusing extra address abstraction 'struct iaddr'. Just use
'in_addr'. Remove many double conversions and other perversions. piaddr() replaced with inet_ntoa(). dhclient is extremely unlikely to support anything but ipv4/dhcp without a complete rewrite. Joint work with chris@. Positive feedback from deraadt@ zinke@ phessler@.
Diffstat (limited to 'sbin/dhclient/parse.c')
-rw-r--r--sbin/dhclient/parse.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sbin/dhclient/parse.c b/sbin/dhclient/parse.c
index 92c33594463..6a1dc4a62b3 100644
--- a/sbin/dhclient/parse.c
+++ b/sbin/dhclient/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.20 2011/12/10 17:15:27 krw Exp $ */
+/* $OpenBSD: parse.c,v 1.21 2012/11/08 21:32:55 krw Exp $ */
/* Common parser code for dhcpd and dhclient. */
@@ -133,11 +133,9 @@ parse_string(FILE *cfile)
}
int
-parse_ip_addr(FILE *cfile, struct iaddr *addr)
+parse_ip_addr(FILE *cfile, struct in_addr *addr)
{
- addr->len = 4;
- return (parse_numeric_aggregate(cfile, addr->iabuf, addr->len, '.',
- 10));
+ return (parse_numeric_aggregate(cfile, (char *)addr, 4, '.', 10));
}
/*