kernel-netlink: Only attempt to remove routing rule if we have a socket

This commit is contained in:
Tobias Brunner 2020-11-03 10:38:38 +01:00
parent 19343998bb
commit 991e9e5dc9
1 changed files with 1 additions and 1 deletions

View File

@ -3046,7 +3046,7 @@ METHOD(kernel_net_t, destroy, void,
enumerator_t *enumerator;
route_entry_t *route;
if (this->routing_table)
if (this->routing_table && this->socket)
{
manage_rule(this, RTM_DELRULE, AF_INET, this->routing_table,
this->routing_table_prio);