summaryrefslogtreecommitdiff
path: root/sbin/dhclient
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2017-07-21 18:57:56 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2017-07-21 18:57:56 +0000
commitfdf653f5d11e0cad7f5173cad6a3e174286a8090 (patch)
treeae768723dc28aa10e2b77dfb648fabb306a68e9b /sbin/dhclient
parent20de92f9ed3291d21dd5e60815ab78f13bbf94ef (diff)
s/set_interface_mtu/set_mtu/g
Diffstat (limited to 'sbin/dhclient')
-rw-r--r--sbin/dhclient/dhclient.c4
-rw-r--r--sbin/dhclient/dhcpd.h4
-rw-r--r--sbin/dhclient/kroute.c19
-rw-r--r--sbin/dhclient/privsep.c11
-rw-r--r--sbin/dhclient/privsep.h8
5 files changed, 22 insertions, 24 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index cc7fd3f1da4..8572c75eb3f 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.473 2017/07/21 18:43:05 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.474 2017/07/21 18:57:55 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -943,7 +943,7 @@ bind_lease(struct interface_info *ifi)
if (mtu < 68)
log_warnx("mtu size %u < 68: ignored", mtu);
else
- set_interface_mtu(mtu);
+ set_mtu(mtu);
}
opt = &options[DHO_SUBNET_MASK];
diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h
index 19651864326..a4a6a0e6f43 100644
--- a/sbin/dhclient/dhcpd.h
+++ b/sbin/dhclient/dhcpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhcpd.h,v 1.212 2017/07/17 15:05:03 krw Exp $ */
+/* $OpenBSD: dhcpd.h,v 1.213 2017/07/21 18:57:55 krw Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
@@ -237,7 +237,7 @@ void read_client_leases(char *, struct client_lease_tq *);
void delete_addresses(char *);
void delete_address(struct in_addr);
-void set_interface_mtu(int);
+void set_mtu(int);
void add_address(struct in_addr, struct in_addr);
void flush_routes(void);
diff --git a/sbin/dhclient/kroute.c b/sbin/dhclient/kroute.c
index 39dfdfc22c9..ba9561e46a5 100644
--- a/sbin/dhclient/kroute.c
+++ b/sbin/dhclient/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.110 2017/07/17 17:53:59 krw Exp $ */
+/* $OpenBSD: kroute.c,v 1.111 2017/07/21 18:57:55 krw Exp $ */
/*
* Copyright 2012 Kenneth R Westerback <krw@openbsd.org>
@@ -609,29 +609,28 @@ priv_delete_address(char *name, int ioctlfd, struct imsg_delete_address *imsg)
}
/*
- * [priv_]set_interface_mtu is the equivalent of
+ * [priv_]set_mtu is the equivalent of
*
* ifconfig <if> mtu <mtu>
*/
void
-set_interface_mtu(int mtu)
+set_mtu(int mtu)
{
- struct imsg_set_interface_mtu imsg;
- int rslt;
+ struct imsg_set_mtu imsg;
+ int rslt;
imsg.mtu = mtu;
- rslt = imsg_compose(unpriv_ibuf, IMSG_SET_INTERFACE_MTU, 0, 0, -1,
+ rslt = imsg_compose(unpriv_ibuf, IMSG_SET_MTU, 0, 0, -1,
&imsg, sizeof(imsg));
if (rslt == -1)
- log_warn("set_interface_mtu: imsg_compose");
+ log_warn("set_mtu: imsg_compose");
- flush_unpriv_ibuf("set_interface_mtu");
+ flush_unpriv_ibuf("set_mtu");
}
void
-priv_set_interface_mtu(char *name, int ioctlfd,
- struct imsg_set_interface_mtu *imsg)
+priv_set_mtu(char *name, int ioctlfd, struct imsg_set_mtu *imsg)
{
struct ifreq ifr;
diff --git a/sbin/dhclient/privsep.c b/sbin/dhclient/privsep.c
index 243df461d98..2683a881883 100644
--- a/sbin/dhclient/privsep.c
+++ b/sbin/dhclient/privsep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: privsep.c,v 1.57 2017/07/14 16:21:03 krw Exp $ */
+/* $OpenBSD: privsep.c,v 1.58 2017/07/21 18:57:55 krw Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
@@ -81,13 +81,12 @@ dispatch_imsg(char *name, int rdomain, int ioctlfd, int routefd,
priv_add_route(rdomain, routefd, imsg.data);
break;
- case IMSG_SET_INTERFACE_MTU:
+ case IMSG_SET_MTU:
if (imsg.hdr.len != IMSG_HEADER_SIZE +
- sizeof(struct imsg_set_interface_mtu))
- log_warnx("bad IMSG_SET_INTERFACE_MTU");
+ sizeof(struct imsg_set_mtu))
+ log_warnx("bad IMSG_SET_MTU");
else
- priv_set_interface_mtu(name, ioctlfd,
- imsg.data);
+ priv_set_mtu(name, ioctlfd, imsg.data);
break;
case IMSG_WRITE_RESOLV_CONF:
diff --git a/sbin/dhclient/privsep.h b/sbin/dhclient/privsep.h
index 15683ae7dc8..9368f7bd804 100644
--- a/sbin/dhclient/privsep.h
+++ b/sbin/dhclient/privsep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: privsep.h,v 1.44 2017/07/10 14:11:47 krw Exp $ */
+/* $OpenBSD: privsep.h,v 1.45 2017/07/21 18:57:55 krw Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
@@ -23,7 +23,7 @@ enum imsg_code {
IMSG_ADD_ADDRESS,
IMSG_FLUSH_ROUTES,
IMSG_ADD_ROUTE,
- IMSG_SET_INTERFACE_MTU,
+ IMSG_SET_MTU,
IMSG_WRITE_RESOLV_CONF
};
@@ -45,7 +45,7 @@ struct imsg_add_route {
int flags;
};
-struct imsg_set_interface_mtu {
+struct imsg_set_mtu {
int mtu;
};
@@ -66,4 +66,4 @@ void priv_write_resolv_conf(uint8_t *, size_t);
void priv_delete_address(char *, int, struct imsg_delete_address *);
void priv_add_address(char *, int, struct imsg_add_address *);
-void priv_set_interface_mtu(char *, int, struct imsg_set_interface_mtu *);
+void priv_set_mtu(char *, int, struct imsg_set_mtu *);