On Sat, Sep 23, 2023 at 03:38:04AM +0200, Phil Sutter wrote: [...] > @@ -3598,60 +3618,107 @@ static int nf_tables_getrule(struct sk_buff *skb, const struct nfnl_info *info, > struct net *net = info->net; > struct nft_table *table; > struct sk_buff *skb2; > - bool reset = false; > int err; > > - if (info->nlh->nlmsg_flags & NLM_F_DUMP) { > - struct netlink_dump_control c = { > - .start= nf_tables_dump_rules_start, > - .dump = nf_tables_dump_rules, > - .done = nf_tables_dump_rules_done, > - .module = THIS_MODULE, > - .data = (void *)nla, > - }; > - > - return nft_netlink_dump_start_rcu(info->sk, skb, info->nlh, &c); > - } > - > table = nft_table_lookup(net, nla[NFTA_RULE_TABLE], family, genmask, 0); > if (IS_ERR(table)) { > NL_SET_BAD_ATTR(extack, nla[NFTA_RULE_TABLE]); > - return PTR_ERR(table); > + return ERR_CAST(table); return ERR_PTR(table); for consistency and to make this batch slightly smaller? > }