kernel-pfroute: Always listen for events
The starter-specific code path isn't necessary anymore since
d8fdd1018e ("starter: Don't flush SAs in the kernel").
This commit is contained in:
@@ -2114,21 +2114,9 @@ kernel_pfroute_net_t *kernel_pfroute_net_create()
|
|||||||
destroy(this);
|
destroy(this);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (streq(lib->ns, "starter"))
|
|
||||||
{
|
|
||||||
/* starter has no threads, so we do not register for kernel events */
|
|
||||||
if (shutdown(this->socket, SHUT_RD) != 0)
|
|
||||||
{
|
|
||||||
DBG1(DBG_KNL, "closing read end of PF_ROUTE socket failed: %s",
|
|
||||||
strerror(errno));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
lib->watcher->add(lib->watcher, this->socket, WATCHER_READ,
|
lib->watcher->add(lib->watcher, this->socket, WATCHER_READ,
|
||||||
(watcher_cb_t)receive_events, this);
|
(watcher_cb_t)receive_events, this);
|
||||||
}
|
|
||||||
if (init_address_list(this) != SUCCESS)
|
if (init_address_list(this) != SUCCESS)
|
||||||
{
|
{
|
||||||
DBG1(DBG_KNL, "unable to get interface list");
|
DBG1(DBG_KNL, "unable to get interface list");
|
||||||
|
|||||||
Reference in New Issue
Block a user