diff options
author | 2020-05-28 15:23:46 +0000 | |
---|---|---|
committer | 2020-05-28 15:23:46 +0000 | |
commit | e73e304d47372f2d80e6adbfad61508ccc87b508 (patch) | |
tree | 4b15e2aa780b23c81215115680886fa44e85f1f2 | |
parent | Call cninit() after parsing boot parameter to make cninit() possible (diff) | |
download | wireguard-openbsd-e73e304d47372f2d80e6adbfad61508ccc87b508.tar.xz wireguard-openbsd-e73e304d47372f2d80e6adbfad61508ccc87b508.zip |
Reduce 'ifa' overloading by renaming proposal field from 'ifa' to
'address'.
-rw-r--r-- | sbin/dhclient/dhclient.c | 8 | ||||
-rw-r--r-- | sbin/dhclient/kroute.c | 8 | ||||
-rw-r--r-- | sbin/dhclient/privsep.h | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 095fb399bda..f5789b10893 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.675 2020/05/26 23:42:11 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.676 2020/05/28 15:23:46 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -1571,7 +1571,7 @@ send_release(struct interface_info *ifi) { ssize_t rslt; - rslt = send_packet(ifi, ifi->configured->ifa, ifi->destination, + rslt = send_packet(ifi, ifi->configured->address, ifi->destination, "DHCPRELEASE"); if (rslt != -1) log_debug("%s: DHCPRELEASE", log_procname); @@ -2028,7 +2028,7 @@ lease_as_proposal(struct client_lease *lease) fatal("proposal"); /* Fill in proposal. */ - proposal->ifa = lease->address; + proposal->address = lease->address; opt = &lease->options[DHO_INTERFACE_MTU]; if (opt->len == sizeof(mtu)) { @@ -2768,7 +2768,7 @@ release_lease(struct interface_info *ifi) if (ifi->configured == NULL || ifi->active == NULL) return; /* Nothing to release. */ - strlcpy(ifabuf, inet_ntoa(ifi->configured->ifa), sizeof(ifabuf)); + strlcpy(ifabuf, inet_ntoa(ifi->configured->address), sizeof(ifabuf)); opt = &ifi->active->options[DHO_DHCP_SERVER_IDENTIFIER]; if (opt->len == sizeof(in_addr_t)) diff --git a/sbin/dhclient/kroute.c b/sbin/dhclient/kroute.c index c52680ade56..252f6ae9eb4 100644 --- a/sbin/dhclient/kroute.c +++ b/sbin/dhclient/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.184 2020/05/26 23:42:11 krw Exp $ */ +/* $OpenBSD: kroute.c,v 1.185 2020/05/28 15:23:46 krw Exp $ */ /* * Copyright 2012 Kenneth R Westerback <krw@openbsd.org> @@ -949,9 +949,9 @@ priv_propose(char *name, int ioctlfd, struct proposal *proposal, set_mtu(name, ioctlfd, proposal->mtu); } - set_address(name, ioctlfd, proposal->ifa, proposal->netmask); + set_address(name, ioctlfd, proposal->address, proposal->netmask); - set_routes(name, index, rdomain, routefd, proposal->ifa, + set_routes(name, index, rdomain, routefd, proposal->address, proposal->netmask, routes, proposal->routes_len); } @@ -979,7 +979,7 @@ priv_revoke_proposal(char *name, int ioctlfd, struct proposal *proposal, free(*resolv_conf); *resolv_conf = NULL; - delete_address(name, ioctlfd, proposal->ifa); + delete_address(name, ioctlfd, proposal->address); } /* diff --git a/sbin/dhclient/privsep.h b/sbin/dhclient/privsep.h index 069a4fb6100..4e7e9f644b8 100644 --- a/sbin/dhclient/privsep.h +++ b/sbin/dhclient/privsep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep.h,v 1.68 2020/05/26 23:42:11 krw Exp $ */ +/* $OpenBSD: privsep.h,v 1.69 2020/05/28 15:23:46 krw Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@openbsd.org> @@ -25,7 +25,7 @@ enum imsg_code { }; struct proposal { - struct in_addr ifa; + struct in_addr address; struct in_addr netmask; unsigned int routes_len; unsigned int domains_len; |