diff --git a/Makefile.in b/Makefile.in index 0885244..d0466c1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -58,9 +58,8 @@ subdir = . DIST_COMMON = README $(am__configure_deps) $(libtins_include_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/libtins.pc.in $(top_srcdir)/configure \ - $(top_srcdir)/include/config.h.in AUTHORS COPYING INSTALL \ - THANKS TODO config.guess config.sub depcomp install-sh \ - ltmain.sh missing + $(top_srcdir)/include/config.h.in AUTHORS INSTALL THANKS \ + config.guess config.sub depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ diff --git a/configure.ac b/configure.ac index 9655689..3f401c0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_INIT([libtins], [1.0], [matias.fontanini@gmail.com], [libtins], [http://libtins.sourceforge.net]) AC_CANONICAL_SYSTEM AC_CONFIG_HEADER(include/config.h) -AM_INIT_AUTOMAKE([-Wall -Werror]) +AM_INIT_AUTOMAKE([-Wall -Werror foreign]) LT_INIT([disable-static]) AC_CONFIG_MACRO_DIR([m4]) AM_MAINTAINER_MODE([enable]) diff --git a/src/handshake_capturer.cpp b/src/handshake_capturer.cpp index 80e546d..b9c8400 100644 --- a/src/handshake_capturer.cpp +++ b/src/handshake_capturer.cpp @@ -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; \ No newline at end of file +} // namespace Tins;