Project

General

Profile

Bug #374

Updated by Tobias Brunner about 9 years ago

I'm 100% sure if this is a bug or not. I've been looking at the MOBIKE code and the roam events that get initiated by changes in routes and ip addresses. I've been looking at libhydra/plugins/kernel_netlink/kernel_netlink_net.c. If there is a route change, its going to call fire_roam_event() with address as false. Lets assume we have a address change before ROAM_DELAY has passed. It is going to call fire_roam_event() again with address true. But it is within the ROAM_DELAY period, so it returns without doing anything. Eventually, the roam_event job executes but no address list is not sent out in the MOBIKE message even though there was an address change.

<pre><code class="c">
static void fire_roam_event(private_kernel_netlink_net_t *this, bool address)
{
timeval_t now;
job_t *job;

if (!this->roam_events)
{
return;
}

time_monotonic(&now);
this->roam_lock->lock(this->roam_lock);
if (!timercmp(&now, &this->next_roam, >))
{
this->roam_lock->unlock(this->roam_lock);
return;
}
timeval_add_ms(&now, ROAM_DELAY);
this->next_roam = now;
this->roam_lock->unlock(this->roam_lock);

job = (job_t*)callback_job_create((callback_job_cb_t)roam_event,
(void*)(uintptr_t)(address ? 1 : 0),
NULL, NULL);
lib->scheduler->schedule_job_ms(lib->scheduler, job, ROAM_DELAY);
}
</code></pre>

Back