summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-03-02 13:02:11 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-03-02 13:02:11 +0000
commit37f1db3223bd4f96d4482feb9f64510285e0e422 (patch)
treeb6fa74e15b3ea30b199049e29db5c593ddc94164
parent9d47939f01a61e8a08f74a7e91ebbfe7bcf0af70 (diff)
here as well: when our interface vanishes, exit
PR3648, test & ok pb
-rw-r--r--usr.sbin/dhcp/dhclient/dhclient.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/usr.sbin/dhcp/dhclient/dhclient.c b/usr.sbin/dhcp/dhclient/dhclient.c
index bc69b24eae4..32531224786 100644
--- a/usr.sbin/dhcp/dhclient/dhclient.c
+++ b/usr.sbin/dhcp/dhclient/dhclient.c
@@ -172,6 +172,7 @@ routehandler(struct protocol *p)
struct rt_msghdr *rtm;
struct if_msghdr *ifm;
struct ifa_msghdr *ifam;
+ struct if_announcemsghdr *ifan;
struct interface_info *ip;
ssize_t n;
@@ -205,6 +206,12 @@ routehandler(struct protocol *p)
if ((rtm->rtm_flags & RTF_UP) == 0)
goto die;
break;
+ case RTM_IFANNOUNCE:
+ ifan = (struct if_announcemsghdr *)rtm;
+ if (ifan->ifan_what == IFAN_DEPARTURE &&
+ (ip = isours(ifan->ifan_index)) != NULL)
+ goto die;
+ break;
default:
break;
}