Various changes (referencing issue #6);

- Fix a bug where re-reading routes would close the interfaces

- Allow unicast solicitation messages (experimental)
This commit is contained in:
Daniel Adolfsson 2016-05-17 08:51:50 +02:00
parent 9709759270
commit 771f9ca29d
3 changed files with 7 additions and 1 deletions

View File

@ -564,7 +564,7 @@ int iface::poll_all()
continue;
}
if (!saddr.is_unicast() || !daddr.is_multicast()) {
if (!saddr.is_unicast()/* || !daddr.is_multicast()*/) {
continue;
}

View File

@ -98,6 +98,10 @@ void proxy::handle_solicit(const address& saddr, const address& daddr,
logger::debug() << "checking " << ru->addr() << " against " << taddr;
if (!daddr.is_multicast() && ru->addr() != daddr) {
continue;
}
if (ru->addr() == taddr) {
if (!se) {
se = session::create(_ptr, saddr, daddr, taddr);

View File

@ -81,6 +81,8 @@ std::string route::token(const char* str)
void route::load(const std::string& path)
{
// Hack to make sure the interfaces are not freed prematurely.
std::list<ptr<route> > tmp_routes(_routes);
_routes.clear();
logger::debug() << "reading routes";