commit dafc741cf23351a6f43895579a72ab8818ba00ae
tree 2fd0af984d588c10152089e45d7c721263adb565
parent 691ce26e4066147ab75366307c5c65d26c7fd805
author Yasuyuki Kozakai <[EMAIL PROTECTED]> 1164651932 -0800
committer David S. Miller <[EMAIL PROTECTED]> 1164776374 -0800

[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: Yasuyuki Kozakai <[EMAIL PROTECTED]>
Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>

 net/netfilter/nf_conntrack_netlink.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/net/netfilter/nf_conntrack_netlink.c 
b/net/netfilter/nf_conntrack_netlink.c
index bd0156a..77a46ee 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -949,6 +949,7 @@ ctnetlink_create_conntrack(struct nfattr
 {
        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
                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:   
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to