diff options
| author | 2019-01-14 03:05:33 +0000 | |
|---|---|---|
| committer | 2019-01-14 03:05:33 +0000 | |
| commit | 73733750347c726d6b2ddcf89cbe3fdf0a8029b2 (patch) | |
| tree | b701eab7d87f8ba4f1ac515301fe9cfc56959fe6 | |
| parent | Check NULLness of ignore list inside apply_ignore_list() and not (diff) | |
| download | wireguard-openbsd-73733750347c726d6b2ddcf89cbe3fdf0a8029b2.tar.xz wireguard-openbsd-73733750347c726d6b2ddcf89cbe3fdf0a8029b2.zip | |
set_default_client_identifier() only needs the
struct ether_addr (a.k.a. ifi->hw_address) rather
than the entire struct interface_info.
| -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); |
