]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
kernel-netlink: Only attempt to remove routing rule if we have a socket
authorTobias Brunner <tobias@strongswan.org>
Tue, 3 Nov 2020 09:38:38 +0000 (10:38 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 4 Nov 2020 09:06:46 +0000 (10:06 +0100)
src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c

index 8d53326ea015eb6f89ba5042715e439d2ea19048..3412877ad9b1957f93862de07b975550fc75debf 100644 (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);