summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2020-05-08 19:00:20 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2020-05-08 19:00:20 +0000
commit501c3c7edb70311aee6c8bf77268b0d856e649ff (patch)
treec0ebf5a11a6c0b28dc6c278f3404f54e57cb1f8e /sbin
parent0a35c1c357f863660650da54a2df75720b226ff5 (diff)
Nuke unneeded 'inits' field in struct proposal. 'mtu' being 0 is enough of a clue
to avoid setting interface mtu.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dhclient/dhclient.c3
-rw-r--r--sbin/dhclient/kroute.c4
-rw-r--r--sbin/dhclient/privsep.h3
3 files changed, 4 insertions, 6 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 0aa9de9f9aa..3343e15dc1c 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.665 2020/05/08 18:47:02 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.666 2020/05/08 19:00:19 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -1990,7 +1990,6 @@ lease_as_proposal(struct client_lease *lease)
if (opt->len == sizeof(uint16_t)) {
memcpy(&proposal->mtu, opt->data, sizeof(proposal->mtu));
proposal->mtu = ntohs(proposal->mtu);
- proposal->inits |= RTV_MTU;
}
opt = &lease->options[DHO_SUBNET_MASK];
diff --git a/sbin/dhclient/kroute.c b/sbin/dhclient/kroute.c
index 31560904a27..179dd05da07 100644
--- a/sbin/dhclient/kroute.c
+++ b/sbin/dhclient/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.172 2019/11/22 22:45:52 krw Exp $ */
+/* $OpenBSD: kroute.c,v 1.173 2020/05/08 19:00:19 krw Exp $ */
/*
* Copyright 2012 Kenneth R Westerback <krw@openbsd.org>
@@ -962,7 +962,7 @@ priv_propose(char *name, int ioctlfd, struct imsg_propose *imsg,
proposal->rtdns,
proposal->rtdns_len);
- if ((proposal->inits & RTV_MTU) != 0) {
+ if (proposal->mtu != 0) {
if (proposal->mtu < 68)
log_warnx("%s: mtu size %u < 68: ignored", log_procname,
proposal->mtu);
diff --git a/sbin/dhclient/privsep.h b/sbin/dhclient/privsep.h
index 020d5532eba..a5e991619f7 100644
--- a/sbin/dhclient/privsep.h
+++ b/sbin/dhclient/privsep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: privsep.h,v 1.62 2020/05/08 18:47:02 krw Exp $ */
+/* $OpenBSD: privsep.h,v 1.63 2020/05/08 19:00:19 krw Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
@@ -36,7 +36,6 @@ struct proposal {
unsigned int rtsearch_len;
unsigned int rtdns_len;
int mtu;
- int inits;
};
struct unwind_info {