--- /dev/null
+++ b/net/sched/act_connmark.c
-@@ -0,0 +1,144 @@
+@@ -0,0 +1,126 @@
+/*
-+ * Copyright (c) 2011 Felix Fietkau <nbd@openwrt.org>
++ * Copyright (c) 2011 Felix Fietkau <nbd@nbd.name>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+
+#define CONNMARK_TAB_MASK 3
+
-+static struct tcf_hashinfo connmark_hash_info;
-+
+static int tcf_connmark(struct sk_buff *skb, const struct tc_action *a,
+ struct tcf_result *res)
+{
+ struct nlattr *est, struct tc_action *a,
+ int ovr, int bind)
+{
-+ struct tcf_common *pc;
+ int ret = 0;
+
-+ pc = tcf_hash_check(0, a, bind);
-+ if (!pc) {
-+ pc = tcf_hash_create(0, est, a, sizeof(*pc), bind);
-+ if (IS_ERR(pc))
-+ return PTR_ERR(pc);
++ if (!tcf_hash_check(0, a, bind)) {
++ ret = tcf_hash_create(0, est, a, sizeof(struct tcf_common), bind);
++ if (ret)
++ return ret;
+
-+ tcf_hash_insert(pc, &connmark_hash_info);
++ tcf_hash_insert(a);
+ ret = ACT_P_CREATED;
+ } else {
+ if (!ovr) {
-+ tcf_hash_release(pc, bind, &connmark_hash_info);
++ tcf_hash_release(a, bind);
+ return -EEXIST;
+ }
+ }
+ return ret;
+}
+
-+static inline int tcf_connmark_cleanup(struct tc_action *a, int bind)
-+{
-+ if (a->priv)
-+ return tcf_hash_release(a->priv, bind, &connmark_hash_info);
-+ return 0;
-+}
-+
+static inline int tcf_connmark_dump(struct sk_buff *skb, struct tc_action *a,
+ int bind, int ref)
+{
+
+static struct tc_action_ops act_connmark_ops = {
+ .kind = "connmark",
-+ .hinfo = &connmark_hash_info,
+ .type = TCA_ACT_CONNMARK,
+ .owner = THIS_MODULE,
+ .act = tcf_connmark,
+ .dump = tcf_connmark_dump,
-+ .cleanup = tcf_connmark_cleanup,
+ .init = tcf_connmark_init,
+};
+
-+MODULE_AUTHOR("Felix Fietkau <nbd@openwrt.org>");
++MODULE_AUTHOR("Felix Fietkau <nbd@nbd.name>");
+MODULE_DESCRIPTION("Connection tracking mark restoring");
+MODULE_LICENSE("GPL");
+
+static int __init connmark_init_module(void)
+{
-+ int ret;
-+
-+ ret = tcf_hashinfo_init(&connmark_hash_info, CONNMARK_TAB_MASK);
-+ if (ret)
-+ return ret;
+
-+ return tcf_register_action(&act_connmark_ops);
++ return tcf_register_action(&act_connmark_ops, CONNMARK_TAB_MASK);
+}
+
+static void __exit connmark_cleanup_module(void)