These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / net / sched / act_connmark.c
index 295d14b..bb41699 100644 (file)
@@ -37,6 +37,7 @@ static int tcf_connmark(struct sk_buff *skb, const struct tc_action *a,
        struct nf_conntrack_tuple tuple;
        enum ip_conntrack_info ctinfo;
        struct tcf_connmark_info *ca = a->priv;
+       struct nf_conntrack_zone zone;
        struct nf_conn *c;
        int proto;
 
@@ -67,10 +68,13 @@ static int tcf_connmark(struct sk_buff *skb, const struct tc_action *a,
        }
 
        if (!nf_ct_get_tuplepr(skb, skb_network_offset(skb),
-                              proto, &tuple))
+                              proto, ca->net, &tuple))
                goto out;
 
-       thash = nf_conntrack_find_get(dev_net(skb->dev), ca->zone, &tuple);
+       zone.id = ca->zone;
+       zone.dir = NF_CT_DEFAULT_ZONE_DIR;
+
+       thash = nf_conntrack_find_get(ca->net, &zone, &tuple);
        if (!thash)
                goto out;
 
@@ -108,12 +112,14 @@ static int tcf_connmark_init(struct net *net, struct nlattr *nla,
        parm = nla_data(tb[TCA_CONNMARK_PARMS]);
 
        if (!tcf_hash_check(parm->index, a, bind)) {
-               ret = tcf_hash_create(parm->index, est, a, sizeof(*ci), bind);
+               ret = tcf_hash_create(parm->index, est, a, sizeof(*ci),
+                                     bind, false);
                if (ret)
                        return ret;
 
                ci = to_connmark(a);
                ci->tcf_action = parm->action;
+               ci->net = net;
                ci->zone = parm->zone;
 
                tcf_hash_insert(a);