aboutsummaryrefslogtreecommitdiffstats
path: root/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2013-04-19 12:16:12 +0200
committerMartin Willi <martin@revosec.ch>2013-05-06 16:10:13 +0200
commitf8646dd65ec1265263dc03d82f962c925509fcf7 (patch)
tree375efcb025c0579f8c0a9f4afa630426e11a16c4 /src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
parentd4260c5f7ffeb2ba4fd1467b7c34463150eed67d (diff)
downloadstrongswan-f8646dd65ec1265263dc03d82f962c925509fcf7.tar.bz2
strongswan-f8646dd65ec1265263dc03d82f962c925509fcf7.tar.xz
kernel-pfkey: check if we have a gateway before comparing them
Diffstat (limited to 'src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c')
-rw-r--r--src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c b/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
index ca7199e66..a562e9bdd 100644
--- a/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
+++ b/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
@@ -251,6 +251,7 @@ static bool route_entry_equals(route_entry_t *a, route_entry_t *b)
{
return a->if_name && b->if_name && streq(a->if_name, b->if_name) &&
a->src_ip->ip_equals(a->src_ip, b->src_ip) &&
+ a->gateway && b->gateway &&
a->gateway->ip_equals(a->gateway, b->gateway) &&
chunk_equals(a->dst_net, b->dst_net) && a->prefixlen == b->prefixlen;
}