Route reinstallation in kernel_ipsec_t implementations is not needed anymore.
authorTobias Brunner <tobias@strongswan.org>
Tue, 20 Dec 2011 14:01:06 +0000 (15:01 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 2 May 2012 13:24:47 +0000 (15:24 +0200)
src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c
src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c

index 5b3196c..3bffadd 100644 (file)
@@ -2158,12 +2158,7 @@ static status_t add_policy_internal(private_kernel_netlink_ipsec_t *this,
                        {
                                route_entry_t *old = policy->route;
                                if (route_entry_equals(old, route))
-                               {       /* keep previously installed route. since it might have
-                                        * still been removed by an address change, we install it
-                                        * again but ignore the result */
-                                       hydra->kernel_interface->add_route(hydra->kernel_interface,
-                                                       route->dst_net, route->prefixlen, route->gateway,
-                                                       route->src_ip, route->if_name);
+                               {
                                        this->mutex->unlock(this->mutex);
                                        route_entry_destroy(route);
                                        return SUCCESS;
index da10edf..cafdb0b 100644 (file)
@@ -2016,12 +2016,7 @@ static status_t add_policy_internal(private_kernel_pfkey_ipsec_t *this,
                        {
                                route_entry_t *old = policy->route;
                                if (route_entry_equals(old, route))
-                               {       /* keep previously installed route. since it might have
-                                        * still been removed by an address change, we install it
-                                        * again but ignore the result */
-                                       hydra->kernel_interface->add_route(hydra->kernel_interface,
-                                                       route->dst_net, route->prefixlen, route->gateway,
-                                                       route->src_ip, route->if_name);
+                               {
                                        this->mutex->unlock(this->mutex);
                                        route_entry_destroy(route);
                                        return SUCCESS;