summaryrefslogtreecommitdiff
path: root/sbin/dhclient/options.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2017-06-13 15:49:33 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2017-06-13 15:49:33 +0000
commit5fe797e771f6b3c3baf01972fa474cd9713065aa (patch)
treead7073902f8791afef7709fdcc0f40e08c7ba0b0 /sbin/dhclient/options.c
parented1c35fde1fff2d1363f942a2807acbebeb232b9 (diff)
Rename 'packet' field to 'recv_packet' and 'bootrequest_packet'
field to 'sent_packet'. Also 'bootrequest_packet_length' to 'sent_packet_length'. Adopt consistent idiom of a local variable 'packet' to point at packet being manipulated. No intentional functional change.
Diffstat (limited to 'sbin/dhclient/options.c')
-rw-r--r--sbin/dhclient/options.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/dhclient/options.c b/sbin/dhclient/options.c
index 62c1bcaf6b7..2b761861945 100644
--- a/sbin/dhclient/options.c
+++ b/sbin/dhclient/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.88 2017/04/09 20:44:13 krw Exp $ */
+/* $OpenBSD: options.c,v 1.89 2017/06/13 15:49:32 krw Exp $ */
/* DHCP options parsing and reassembly. */
@@ -163,7 +163,7 @@ int
cons_options(struct interface_info *ifi, struct option_data *options)
{
struct client_state *client = ifi->client;
- unsigned char *buf = client->bootrequest_packet.options;
+ unsigned char *buf = client->sent_packet.options;
int buflen = 576 - DHCP_FIXED_LEN;
int ix, incr, length, bufix, code, lastopt = -1;
@@ -635,7 +635,7 @@ do_packet(struct interface_info *ifi, unsigned int from_port,
struct in_addr from, struct ether_addr *hfrom)
{
struct client_state *client = ifi->client;
- struct dhcp_packet *packet = &client->packet;
+ struct dhcp_packet *packet = &client->recv_packet;
struct option_data options[256];
struct reject_elem *ap;
void (*handler)(struct interface_info *, struct in_addr,
@@ -659,10 +659,10 @@ do_packet(struct interface_info *ifi, unsigned int from_port,
return;
}
- if (client->xid != client->packet.xid) {
+ if (client->xid != packet->xid) {
#ifdef DEBUG
log_debug("Discarding packet with XID != %u (%u)", client->xid,
- client->packet.xid);
+ packet->xid);
#endif /* DEBUG */
return;
}