aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>2006-11-27 13:25:32 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-11-28 23:59:34 -0500
commitdafc741cf23351a6f43895579a72ab8818ba00ae (patch)
tree2fd0af984d588c10152089e45d7c721263adb565
parent691ce26e4066147ab75366307c5c65d26c7fd805 (diff)
[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 <yasuyuki.kozakai@toshiba.co.jp> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/netfilter/nf_conntrack_netlink.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index bd0156a28ecd..77a46eef66c1 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -949,6 +949,7 @@ ctnetlink_create_conntrack(struct nfattr *cda[],
949{ 949{
950 struct nf_conn *ct; 950 struct nf_conn *ct;
951 int err = -EINVAL; 951 int err = -EINVAL;
952 struct nf_conn_help *help;
952 953
953 ct = nf_conntrack_alloc(otuple, rtuple); 954 ct = nf_conntrack_alloc(otuple, rtuple);
954 if (ct == NULL || IS_ERR(ct)) 955 if (ct == NULL || IS_ERR(ct))
@@ -976,9 +977,16 @@ ctnetlink_create_conntrack(struct nfattr *cda[],
976 ct->mark = ntohl(*(u_int32_t *)NFA_DATA(cda[CTA_MARK-1])); 977 ct->mark = ntohl(*(u_int32_t *)NFA_DATA(cda[CTA_MARK-1]));
977#endif 978#endif
978 979
980 help = nfct_help(ct);
981 if (help)
982 help->helper = nf_ct_helper_find_get(rtuple);
983
979 add_timer(&ct->timeout); 984 add_timer(&ct->timeout);
980 nf_conntrack_hash_insert(ct); 985 nf_conntrack_hash_insert(ct);
981 986
987 if (help && help->helper)
988 nf_ct_helper_put(help->helper);
989
982 return 0; 990 return 0;
983 991
984err: 992err: