oo_keygen() requires oo_compare(). Assert in nl_cache_mngt_register().
http://lists.infradead.org/pipermail/libnl/2014-November/001759.html
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
if (!ops->co_name || !ops->co_obj_ops)
return -NLE_INVAL;
+ /* oo_keygen() also needs oo_compare() */
+ BUG_ON (ops->co_obj_ops->oo_keygen && !ops->co_obj_ops->oo_compare);
+
nl_write_lock(&cache_ops_lock);
if (__nl_cache_ops_lookup(ops->co_name)) {
nl_write_unlock(&cache_ops_lock);