summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2018-05-17 13:46:57 +0000
committerkrw <krw@openbsd.org>2018-05-17 13:46:57 +0000
commit4a3209633f44340894524a967a78d00731e7cc16 (patch)
tree03f951f7bdc8a92649a5c9b6276a85c5ac677d10
parentHandle RTM_DELETE of slaacd managed default route by re-inserting it. (diff)
downloadwireguard-openbsd-4a3209633f44340894524a967a78d00731e7cc16.tar.xz
wireguard-openbsd-4a3209633f44340894524a967a78d00731e7cc16.zip
Any IPv4 address change could alter which interface has the active
default route and thus 'owns' resolv.conf. So check if resolv.conf should be (re)written after all IPv4 RTM_NEWADDR or RTM_DELADDR messages.
-rw-r--r--sbin/dhclient/dhclient.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 3c0fb4caf58..6121170acf1 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.570 2018/05/16 19:51:10 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.571 2018/05/17 13:46:57 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -390,8 +390,6 @@ routehandler(struct interface_info *ifi, int routefd)
case RTM_DELADDR:
/* Need to check if it is time to write resolv.conf. */
ifam = (struct ifa_msghdr *)rtm;
- if (ifam->ifam_index != ifi->index)
- goto done;
if (get_ifa_family((char *)ifam + ifam->ifam_hdrlen,
ifam->ifam_addrs) != AF_INET)
goto done;