Commit 0e44c294 authored by Thomas Haller's avatar Thomas Haller

platform: allow AF_UNSPEC for nmp_lookup_init_object_by_addr_family()

parent c4788e61
......@@ -2146,9 +2146,12 @@ nmp_lookup_init_object_by_addr_family (NMPLookup *lookup,
NMPObject *o;
nm_assert (lookup);
nm_assert_addr_family (addr_family);
nm_assert (NM_IN_SET (obj_type, NMP_OBJECT_TYPE_ROUTING_RULE));
if (addr_family == AF_UNSPEC)
return nmp_lookup_init_obj_type (lookup, obj_type);
nm_assert_addr_family (addr_family);
o = _nmp_object_stackinit_from_type (&lookup->selector_obj, obj_type);
NMP_OBJECT_CAST_ROUTING_RULE (o)->addr_family = addr_family;
lookup->cache_id_type = NMP_CACHE_ID_TYPE_OBJECT_BY_ADDR_FAMILY;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment