diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2019-01-14 03:05:34 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2019-01-14 03:05:34 +0000 |
commit | df2d270d80d62a639ba832d175295b2ec29be9a6 (patch) | |
tree | 35b652eb9c744f09a4ba5ee066da3ce835ee6b76 /sbin/dhclient | |
parent | 845d63f95a26e117da799f8761f6e2d155290c65 (diff) |
set_default_client_identifier() only needs the
struct ether_addr (a.k.a. ifi->hw_address) rather
than the entire struct interface_info.
Diffstat (limited to 'sbin/dhclient')
-rw-r--r-- | sbin/dhclient/clparse.c | 6 | ||||
-rw-r--r-- | sbin/dhclient/dhclient.c | 4 | ||||
-rw-r--r-- | sbin/dhclient/dhcpd.h | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c index 05a658b5678..831c5c6c513 100644 --- a/sbin/dhclient/clparse.c +++ b/sbin/dhclient/clparse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clparse.c,v 1.173 2019/01/14 02:51:29 krw Exp $ */ +/* $OpenBSD: clparse.c,v 1.174 2019/01/14 03:05:33 krw Exp $ */ /* Parser for dhclient config and lease files. */ @@ -885,7 +885,7 @@ apply_ignore_list(char *ignore_list) } void -set_default_client_identifier(struct interface_info *ifi) +set_default_client_identifier(struct ether_addr *hwaddr) { struct option_data *opt; @@ -903,7 +903,7 @@ set_default_client_identifier(struct interface_info *ifi) if (opt->data == NULL) fatal("default client identifier"); opt->data[0] = HTYPE_ETHER; - memcpy(&opt->data[1], ifi->hw_address.ether_addr_octet, + memcpy(&opt->data[1], hwaddr->ether_addr_octet, ETHER_ADDR_LEN); opt->len = ETHER_ADDR_LEN + 1; } diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 2a99dde17ff..bb9397e596d 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.604 2019/01/14 02:51:29 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.605 2019/01/14 03:05:33 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -587,7 +587,7 @@ main(int argc, char *argv[]) * the leases file! Changes to the lladdr will trigger a restart * and go through here again. */ - set_default_client_identifier(ifi); + set_default_client_identifier(&ifi->hw_address); /* * Set default hostname, if needed. */ diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h index 8c07175a3f5..9a71f79dda9 100644 --- a/sbin/dhclient/dhcpd.h +++ b/sbin/dhclient/dhcpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpd.h,v 1.265 2019/01/13 23:15:31 krw Exp $ */ +/* $OpenBSD: dhcpd.h,v 1.266 2019/01/14 03:05:33 krw Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@openbsd.org> @@ -236,7 +236,7 @@ uint32_t wrapsum(uint32_t); void read_conf(char *); void read_lease_db(char *, struct client_lease_tq *); void apply_ignore_list(char *); -void set_default_client_identifier(struct interface_info *); +void set_default_client_identifier(struct ether_addr *); void set_default_hostname(void); void read_resolv_conf_tail(void); |