summaryrefslogtreecommitdiff
path: root/sbin/dhclient/dhclient.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2017-07-07 14:53:08 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2017-07-07 14:53:08 +0000
commit7530d4ffaa87a529d219f787ba0ed20f22630404 (patch)
treef2f9cbc9a8d143969574deb7fa52331732672737 /sbin/dhclient/dhclient.c
parent6f7a7c9a70f9eea70fe7639a740fdd33d1830135 (diff)
Rename cons_options() to pack_options(), and do_packet() to
unpack_options(). Store the unpacked options in a static variable. Move remaining raw packet processing from unpack_options() to packethandler(). No more struct interface_info knowledge in options.c
Diffstat (limited to 'sbin/dhclient/dhclient.c')
-rw-r--r--sbin/dhclient/dhclient.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index ccbbe58425d..94659f6aa21 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.456 2017/07/06 16:56:52 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.457 2017/07/07 14:53:06 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -1560,7 +1560,7 @@ make_discover(struct interface_info *ifi, struct client_lease *lease)
* RFC 791 says is the largest packet that *MUST* be accepted
* by any host.
*/
- i = cons_options(ifi->sent_packet.options, 576 - DHCP_FIXED_LEN,
+ i = pack_options(ifi->sent_packet.options, 576 - DHCP_FIXED_LEN,
options);
if (i == -1 || packet->options[i] != DHO_END)
fatalx("options do not fit in DHCPDISCOVER packet.");
@@ -1636,7 +1636,7 @@ make_request(struct interface_info *ifi, struct client_lease * lease)
* RFC 791 says is the largest packet that *MUST* be accepted
* by any host.
*/
- i = cons_options(ifi->sent_packet.options, 576 - DHCP_FIXED_LEN,
+ i = pack_options(ifi->sent_packet.options, 576 - DHCP_FIXED_LEN,
options);
if (i == -1 || packet->options[i] != DHO_END)
fatalx("options do not fit in DHCPREQUEST packet.");
@@ -1709,7 +1709,7 @@ make_decline(struct interface_info *ifi, struct client_lease *lease)
* RFC 791 says is the largest packet that *MUST* be accepted
* by any host.
*/
- i = cons_options(ifi->sent_packet.options, 576 - DHCP_FIXED_LEN,
+ i = pack_options(ifi->sent_packet.options, 576 - DHCP_FIXED_LEN,
options);
if (i == -1 || packet->options[i] != DHO_END)
fatalx("options do not fit in DHCPDECLINE packet.");