diff options
author | Timo Teräs <timo.teras@iki.fi> | 2010-10-19 12:36:22 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2010-10-19 12:37:14 +0300 |
commit | 42251141383b7fb214a778a604f0c3fbd31c723d (patch) | |
tree | a6f903fda2281c52939004a18d64f8fccfbf885e | |
parent | 73fcd2e4202ac9f12165626b4a81df087ed86230 (diff) | |
download | squark-42251141383b7fb214a778a604f0c3fbd31c723d.tar.bz2 squark-42251141383b7fb214a778a604f0c3fbd31c723d.tar.xz |
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).
-rw-r--r-- | squark-auth-snmp.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) |