提交 dafc741c 编写于 作者: Y Yasuyuki Kozakai 提交者: David S. Miller

[NETFILTER]: nfctnetlink: assign helper to newly created conntrack

This fixes the bug which doesn't assign helper to newly created
conntrack via nf_conntrack_netlink.
Signed-off-by: NYasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: NPatrick McHardy <kaber@trash.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 691ce26e
......@@ -949,6 +949,7 @@ ctnetlink_create_conntrack(struct nfattr *cda[],
{
struct nf_conn *ct;
int err = -EINVAL;
struct nf_conn_help *help;
ct = nf_conntrack_alloc(otuple, rtuple);
if (ct == NULL || IS_ERR(ct))
......@@ -976,9 +977,16 @@ ctnetlink_create_conntrack(struct nfattr *cda[],
ct->mark = ntohl(*(u_int32_t *)NFA_DATA(cda[CTA_MARK-1]));
#endif
help = nfct_help(ct);
if (help)
help->helper = nf_ct_helper_find_get(rtuple);
add_timer(&ct->timeout);
nf_conntrack_hash_insert(ct);
if (help && help->helper)
nf_ct_helper_put(help->helper);
return 0;
err:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册