diff options
-rw-r--r-- | sbin/dhclient/dhclient.c | 10 | ||||
-rw-r--r-- | sbin/dhclient/dhcpd.h | 14 | ||||
-rw-r--r-- | sbin/dhclient/kroute.c | 20 | ||||
-rw-r--r-- | sbin/dhclient/privsep.c | 8 |
4 files changed, 26 insertions, 26 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index d231c112ebf..c295b08feb7 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.172 2012/11/11 16:36:13 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.173 2012/11/14 15:47:41 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -656,14 +656,14 @@ bind_lease(void) struct client_lease *lease; char *domainname, *nameservers; - delete_old_addresses(ifi->name, ifi->rdomain); + delete_addresses(ifi->name, ifi->rdomain); flush_routes_and_arp_cache(ifi->rdomain); lease = apply_defaults(client->new); options = lease->options; memcpy(&mask.s_addr, options[DHO_SUBNET_MASK].data, sizeof(in_addr_t)); - add_new_address(ifi->name, ifi->rdomain, client->new->address, mask); + add_address(ifi->name, ifi->rdomain, client->new->address, mask); if (options[DHO_ROUTERS].len) { memset(&gateway, 0, sizeof(gateway)); /* XXX Only use FIRST router address for now. */ @@ -1101,7 +1101,7 @@ send_request(void) if (client->state != S_REQUESTING && cur_time > client->active->expiry) { if (client->active) { - delete_old_address(ifi->name, ifi->rdomain, + delete_address(ifi->name, ifi->rdomain, client->active->address); } client->state = S_INIT; @@ -1816,7 +1816,7 @@ new_resolv_conf(char *ifname, char *domainname, char *nameservers) } void -priv_new_resolv_conf(char *contents) +priv_resolv_conf(char *contents) { ssize_t n; int conffd, tailfd, tailn; diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h index 1af1429e245..4a34af62311 100644 --- a/sbin/dhclient/dhcpd.h +++ b/sbin/dhclient/dhcpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpd.h,v 1.91 2012/11/08 21:32:55 krw Exp $ */ +/* $OpenBSD: dhcpd.h,v 1.92 2012/11/14 15:47:41 krw Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@openbsd.org> @@ -295,7 +295,7 @@ void go_daemon(void); void routehandler(void); -void priv_new_resolv_conf(char *); +void priv_resolv_conf(char *); /* packet.c */ void assemble_hw_header(unsigned char *, int *, struct hardware *); @@ -318,12 +318,12 @@ int parse_option_decl(FILE *, struct option_data *); void parse_reject_statement(FILE *); /* kroute.c */ -void delete_old_addresses(char *, int); -void delete_old_address(char *, int, struct in_addr); -void priv_delete_old_address(char *, int, struct in_addr); +void delete_addresses(char *, int); +void delete_address(char *, int, struct in_addr); +void priv_delete_address(char *, int, struct in_addr); -void add_new_address(char *, int, struct in_addr, struct in_addr); -void priv_add_new_address(char *, int, struct in_addr, struct in_addr); +void add_address(char *, int, struct in_addr, struct in_addr); +void priv_add_address(char *, int, struct in_addr, struct in_addr); void flush_routes_and_arp_cache(int); void priv_flush_routes_and_arp_cache(int); diff --git a/sbin/dhclient/kroute.c b/sbin/dhclient/kroute.c index 0fb9ab4da75..5cb5ae5c747 100644 --- a/sbin/dhclient/kroute.c +++ b/sbin/dhclient/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.14 2012/11/08 21:32:55 krw Exp $ */ +/* $OpenBSD: kroute.c,v 1.15 2012/11/14 15:47:41 krw Exp $ */ /* * Copyright 2012 Kenneth R Westerback <krw@openbsd.org> @@ -328,13 +328,13 @@ priv_add_default_route(int rdomain, struct in_addr addr, * Delete all existing inet addresses on interface. */ void -delete_old_addresses(char *ifname, int rdomain) +delete_addresses(char *ifname, int rdomain) { struct in_addr addr; struct ifaddrs *ifap, *ifa; if (getifaddrs(&ifap) != 0) - error("delete_old_addresses getifaddrs: %m"); + error("delete_addresses getifaddrs: %m"); for (ifa = ifap; ifa; ifa = ifa->ifa_next) { if ((ifa->ifa_flags & IFF_LOOPBACK) || @@ -349,20 +349,20 @@ delete_old_addresses(char *ifname, int rdomain) &((struct sockaddr_in *)ifa->ifa_addr)->sin_addr, sizeof(in_addr_t)); - delete_old_address(ifi->name, ifi->rdomain, addr); + delete_address(ifi->name, ifi->rdomain, addr); } freeifaddrs(ifap); } /* - * [priv_]delete_old_address is the equivalent of + * [priv_]delete_address is the equivalent of * * ifconfig <ifname> inet <addr> delete * route -q <rdomain> delete <addr> 127.0.0.1 */ void -delete_old_address(char *ifname, int rdomain, struct in_addr addr) +delete_address(char *ifname, int rdomain, struct in_addr addr) { size_t len; struct imsg_hdr hdr; @@ -396,7 +396,7 @@ delete_old_address(char *ifname, int rdomain, struct in_addr addr) } void -priv_delete_old_address(char *ifname, int rdomain, struct in_addr addr) +priv_delete_address(char *ifname, int rdomain, struct in_addr addr) { struct ifaliasreq ifaliasreq; struct rt_msghdr rtm; @@ -486,13 +486,13 @@ priv_delete_old_address(char *ifname, int rdomain, struct in_addr addr) } /* - * [priv_]add_new_address is the equivalent of + * [priv_]add_address is the equivalent of * * ifconfig <if> inet <addr> netmask <mask> broadcast <addr> * route -q <rdomain> add <addr> 127.0.0.1 */ void -add_new_address(char *ifname, int rdomain, struct in_addr addr, +add_address(char *ifname, int rdomain, struct in_addr addr, struct in_addr mask) { struct buf *buf; @@ -531,7 +531,7 @@ add_new_address(char *ifname, int rdomain, struct in_addr addr, } void -priv_add_new_address(char *ifname, int rdomain, struct in_addr addr, +priv_add_address(char *ifname, int rdomain, struct in_addr addr, struct in_addr mask) { struct ifaliasreq ifaliasreq; diff --git a/sbin/dhclient/privsep.c b/sbin/dhclient/privsep.c index f3817b22d36..5ab2c2a6759 100644 --- a/sbin/dhclient/privsep.c +++ b/sbin/dhclient/privsep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep.c,v 1.22 2012/11/08 21:32:55 krw Exp $ */ +/* $OpenBSD: privsep.c,v 1.23 2012/11/14 15:47:41 krw Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@openbsd.org> @@ -151,7 +151,7 @@ dispatch_imsg(int fd) error("IMSG_DELETE_ADDRESS addr missing %zu", len); } - priv_delete_old_address(ifname, rdomain, *addr); + priv_delete_address(ifname, rdomain, *addr); free(ifname); free(addr); break; @@ -222,7 +222,7 @@ dispatch_imsg(int fd) error("IMSG_ADD_ADDRESS mask missing %zu", len); } - priv_add_new_address(ifname, rdomain, *addr, *mask); + priv_add_address(ifname, rdomain, *addr, *mask); free(ifname); free(addr); free(mask); @@ -320,7 +320,7 @@ dispatch_imsg(int fd) totlen += len; } - priv_new_resolv_conf(contents); + priv_resolv_conf(contents); free(contents); break; default: |