kernel-pfkey: check if we have a gateway before comparing them

This commit is contained in:
Martin Willi 2013-04-19 12:16:12 +02:00
parent d4260c5f7f
commit f8646dd65e
1 changed files with 1 additions and 0 deletions

View 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;
}