提交 3d9bbaf6 编写于 作者: P Pablo Neira Ayuso

netfilter: nfnetlink_hook: use the sequence number of the request message

The sequence number allows to correlate the netlink reply message (as
part of the dump) with the original request message.

The cb->seq field is internally used to detect an interference (update)
of the hook list during the netlink dump, do not use it as sequence
number in the netlink dump header.

Fixes: e2cf17d3 ("netfilter: add new hook nfnl subsystem")
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
上级 a6e57c4a
......@@ -264,7 +264,8 @@ static int nfnl_hook_dump(struct sk_buff *nlskb,
ops = nf_hook_entries_get_hook_ops(e);
for (; i < e->num_hook_entries; i++) {
err = nfnl_hook_dump_one(nlskb, ctx, ops[i], cb->seq);
err = nfnl_hook_dump_one(nlskb, ctx, ops[i],
cb->nlh->nlmsg_seq);
if (err)
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册