From f6ef3fe494a1e7dc20fe5fc7978df9a580f2f07f Mon Sep 17 00:00:00 2001 From: John Sharratt Date: Sun, 2 Jul 2017 21:50:23 +0200 Subject: [PATCH] Was touching all the sessions rather than the one that had an solicitation request causing none of the sessions to really expire --- src/proxy.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/proxy.cc b/src/proxy.cc index cc3b109..c878ac6 100644 --- a/src/proxy.cc +++ b/src/proxy.cc @@ -75,9 +75,10 @@ void proxy::handle_solicit(const address& saddr, const address& daddr, for (std::list >::iterator sit = _sessions.begin(); sit != _sessions.end(); sit++) { - (*sit)->touch(); - - if ((*sit)->taddr() == taddr) { + if ((*sit)->taddr() == taddr) + { + (*sit)->touch(); + switch ((*sit)->status()) { case session::WAITING: case session::INVALID: