Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2015-03-19 (Thu, 19 Mar 2015)
[host] create dst_cache sync and async functions and fix link lookup race condition
Prior to this change, there was a potential race condition in which, when shutting
down a link, the destination cache would not be updated in time and pckts would
be lost in an invalid socket.
This change introduced a sync version of the dst cache update and protects
outgoing traffic socket lookup with a mutex.
The only downside of this change is that, in future, when we will introduce
complex switching algorithms, we might have to spend a bit more time
recalculating the network topology on link shutdown and halt traffic switching.
Pro is that we have a smaller gap in lost traffic when reconfiguring the local
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>