diff options
-rw-r--r-- | sbin/dhclient/dhclient.c | 11 | ||||
-rw-r--r-- | sbin/dhclient/dhcpd.h | 3 |
2 files changed, 11 insertions, 3 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index fe3ed74a1d5..c7df8d40cea 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.634 2019/05/10 18:50:11 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.635 2019/05/22 12:56:31 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -259,6 +259,8 @@ interface_state(struct interface_info *ifi) } else { ifi->link_state = ((struct if_data *)ifa->ifa_data)->ifi_link_state; + ifi->mtu = + ((struct if_data *)ifa->ifa_data)->ifi_mtu; } freeifaddrs(ifap); @@ -342,6 +344,7 @@ rtm_dispatch(struct interface_info *ifi, struct rt_msghdr *rtm) struct if_announcemsghdr *ifan; struct ifa_msghdr *ifam; struct if_ieee80211_data *ifie; + uint32_t oldmtu; switch (rtm->rtm_type) { case RTM_PROPOSAL: @@ -375,9 +378,13 @@ rtm_dispatch(struct interface_info *ifi, struct rt_msghdr *rtm) if ((rtm->rtm_flags & RTF_UP) == 0) fatalx("down"); + oldmtu = ifi->mtu; interface_state(ifi); - if (quit == 0) + if (oldmtu == ifi->mtu) quit = RESTART; + else + log_debug("%s: MTU change RTM_IFINFO ignored", + log_procname); break; case RTM_80211INFO: diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h index 980777a629d..0505a39611e 100644 --- a/sbin/dhclient/dhcpd.h +++ b/sbin/dhclient/dhcpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpd.h,v 1.277 2019/04/02 02:59:43 krw Exp $ */ +/* $OpenBSD: dhcpd.h,v 1.278 2019/05/22 12:56:31 krw Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@openbsd.org> @@ -129,6 +129,7 @@ struct interface_info { int rdomain; int flags; #define IFI_IN_CHARGE 0x01 + uint32_t mtu; struct dhcp_packet recv_packet; struct dhcp_packet sent_packet; int sent_packet_length; |