Discussion:
[strongSwan-dev] installing route in table 220 is random
pothuganti sridhar
2016-06-10 09:20:07 UTC
Permalink
Hi,

I am using strongswan 5.3.0 as hub in "hub and spoke" topology. In the HUB
I am configuring "leftsubnet" as "0.0.0.0/0".

When leftsubnet is "0.0.0.0/0", installation of route is not happening
always. I have debugged this issue, and found a variable is being used
uninitialized causing this issue.

Following is the fix.

diff --git a/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
b/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
index 3b32ba5..2e91ec4 100644
--- a/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
+++ b/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
@@ -2227,7 +2227,7 @@ static bool
install_route(private_kernel_pfkey_ipsec_t *this,
{
route_entry_t *route, *old;
host_t *host, *src, *dst;
- bool is_virtual;
+ bool is_virtual=0;

if
(hydra->kernel_interface->get_address_by_ts(hydra->kernel_interface,

in->dst_ts, &host, &is_virtual) != SUCCESS)
--

What is the best way to contribute to the strongswan code, if we made any
fixes.

Thanks,
Sridhar
Tobias Brunner
2016-06-10 13:47:57 UTC
Permalink
Hi Sridhar,

Fixed in master [1].

Regards,
Tobias

[1] https://git.strongswan.org/?p=strongswan.git;a=commitdiff;h=436f64d5
pothuganti sridhar
2016-06-11 08:17:39 UTC
Permalink
Hi Tobias,

Thanks for making this fix to the master.
I will correct my fix as per your changes.

Regards,
Sridhar
Post by Tobias Brunner
Hi Sridhar,
Fixed in master [1].
Regards,
Tobias
[1] https://git.strongswan.org/?p=strongswan.git;a=commitdiff;h=436f64d5
Loading...