summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2017-12-05 14:57:15 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2017-12-05 14:57:15 +0000
commit665ffeda0356ad690d72fec5a21baa404da49bf1 (patch)
tree59d7f04323916d7ed73a46547879c068e4fcc542
parent8a6ca3ddde7e10e1f60ccfffed9cba3695d5b3c4 (diff)
When removing duplicate dynamic leases from the cache, compare the
SSID against ifi->ssid, not the SSID of the new lease. They should be the same, but this makes the intent clearer and removes an assumption about the contents of ifi->active.
-rw-r--r--sbin/dhclient/dhclient.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 94a85602f8d..efbe1c76797 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.534 2017/12/04 15:00:03 tb Exp $ */
+/* $OpenBSD: dhclient.c,v 1.535 2017/12/05 14:57:14 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -1070,9 +1070,9 @@ newlease:
break;
if (ifi->active == NULL)
continue;
- if (ifi->active->ssid_len != lease->ssid_len)
+ if (ifi->ssid_len != lease->ssid_len)
continue;
- if (memcmp(ifi->active->ssid, lease->ssid, lease->ssid_len)
+ if (memcmp(ifi->ssid, lease->ssid, lease->ssid_len)
!= 0)
continue;
if (ifi->active == lease)