Merge tag 'wireless-drivers-for-davem-2015-07-20' of git://git.kernel.org/pub/scm...
[firefly-linux-kernel-4.4.55.git] / net / sched / cls_flower.c
index b92d3f49c23e0dd93ac2ff0766bb97f1add15baa..2f3d03f99487ed35c4af1e5c7ede590e4b0e3721 100644 (file)
@@ -216,8 +216,8 @@ static const struct nla_policy fl_policy[TCA_FLOWER_MAX + 1] = {
        [TCA_FLOWER_KEY_IPV6_DST_MASK]  = { .len = sizeof(struct in6_addr) },
        [TCA_FLOWER_KEY_TCP_SRC]        = { .type = NLA_U16 },
        [TCA_FLOWER_KEY_TCP_DST]        = { .type = NLA_U16 },
-       [TCA_FLOWER_KEY_TCP_SRC]        = { .type = NLA_U16 },
-       [TCA_FLOWER_KEY_TCP_DST]        = { .type = NLA_U16 },
+       [TCA_FLOWER_KEY_UDP_SRC]        = { .type = NLA_U16 },
+       [TCA_FLOWER_KEY_UDP_DST]        = { .type = NLA_U16 },
 };
 
 static void fl_set_key_val(struct nlattr **tb,
@@ -499,7 +499,7 @@ static int fl_change(struct net *net, struct sk_buff *in_skb,
        *arg = (unsigned long) fnew;
 
        if (fold) {
-               list_replace_rcu(&fnew->list, &fold->list);
+               list_replace_rcu(&fold->list, &fnew->list);
                tcf_unbind_filter(tp, &fold->res);
                call_rcu(&fold->rcu, fl_destroy_filter);
        } else {