From 42251141383b7fb214a778a604f0c3fbd31c723d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Tue, 19 Oct 2010 12:36:22 +0300 Subject: auth-snmp: reset switch flags on rediscovery Otherwise we might attempt to access invalid or even unreceived data (e.g. if switch was swapped, is offline, or just did not respond to us). --- squark-auth-snmp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/squark-auth-snmp.c b/squark-auth-snmp.c index d72c958..b425e70 100644 --- a/squark-auth-snmp.c +++ b/squark-auth-snmp.c @@ -325,6 +325,8 @@ static void switch_info_free(struct switch_info *si) safe_free(&si->system_location); safe_free(&si->system_version); safe_free(&si->system_oid.ptr); + si->info_available = 0; + si->flags = 0; } struct switch_info *get_switch(sockaddr_any *addr) -- cgit v1.2.3