]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
kernel-pfkey: check if we have a gateway before comparing them
authorMartin Willi <martin@revosec.ch>
Fri, 19 Apr 2013 10:16:12 +0000 (12:16 +0200)
committerMartin Willi <martin@revosec.ch>
Mon, 6 May 2013 14:10:13 +0000 (16:10 +0200)
src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c

index ca7199e66c456f05d9a86a7f42503a75f5479d90..a562e9bdd3a8cc97ea336fa449d3929bc2bf9e9b 100644 (file)
@@ -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;
 }