1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-28 12:44:25 +01:00

Added automake foreign option.

This commit is contained in:
Matias Fontanini
2013-05-28 15:19:00 -03:00
parent 4960077495
commit cacf75995d
3 changed files with 10 additions and 8 deletions

View File

@@ -55,7 +55,7 @@ namespace Tins {
handshakes_[addresses].assign(eapol, eapol + 1);
}
else if(eapol->key_t() && eapol->key_mic() && !eapol->install() && !eapol->key_ack()) {
if(!eapol->secure())
if(*std::max_element(eapol->nonce(), eapol->nonce() + RSNEAPOL::nonce_size) > 0)
do_insert(addresses, eapol, 1);
else if(do_insert(addresses, eapol, 3)) {
completed_handshakes_.push_back(
@@ -80,8 +80,11 @@ namespace Tins {
{
handshake_map::iterator iter = handshakes_.find(key);
if(iter != handshakes_.end()) {
if(iter->second.size() != expected)
iter->second.clear();
if(iter->second.size() != expected) {
// skip repeated
if(iter->second.size() != expected + 1)
iter->second.clear();
}
else {
iter->second.push_back(*eapol);
return true;
@@ -89,4 +92,4 @@ namespace Tins {
}
return false;
}
} // namespace Tins;
} // namespace Tins;