struct table *table;
uint32_t hash;
- if (!name)
- return NULL;
+ assert(name);
hash = djb_hash(name) % NFT_CACHE_HSIZE;
list_for_each_entry(table, &cache->ht[hash], cache.hlist) {
struct chain *chain;
uint32_t hash;
+ assert(name);
+
hash = djb_hash(name) % NFT_CACHE_HSIZE;
list_for_each_entry(chain, &table->chain_cache.ht[hash], cache.hlist) {
if (!strcmp(chain->handle.chain.name, name))
struct set *set;
uint32_t hash;
+ assert(name);
+
hash = djb_hash(name) % NFT_CACHE_HSIZE;
list_for_each_entry(set, &table->set_cache.ht[hash], cache.hlist) {
if (!strcmp(set->handle.set.name, name))
struct obj *obj;
uint32_t hash;
+ assert(name);
+
hash = djb_hash(name) % NFT_CACHE_HSIZE;
list_for_each_entry(obj, &table->obj_cache.ht[hash], cache.hlist) {
if (!strcmp(obj->handle.obj.name, name) &&
struct flowtable *ft;
uint32_t hash;
+ assert(name);
+
hash = djb_hash(name) % NFT_CACHE_HSIZE;
list_for_each_entry(ft, &table->ft_cache.ht[hash], cache.hlist) {
if (!strcmp(ft->handle.flowtable.name, name))