Merge tag 'for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux...
[deliverable/linux.git] / net / ipv6 / fib6_rules.c
index 3fd0a578329e523828fc56b40b6ffe217fd850dc..70bc6abc0639cf88d0b23b295c20d941b456d98b 100644 (file)
@@ -104,6 +104,7 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp,
                                goto again;
                        flp6->saddr = saddr;
                }
+               err = rt->dst.error;
                goto out;
        }
 again:
@@ -169,7 +170,7 @@ static int fib6_rule_match(struct fib_rule *rule, struct flowi *fl, int flags)
                        return 0;
        }
 
-       if (r->tclass && r->tclass != ((ntohl(fl6->flowlabel) >> 20) & 0xff))
+       if (r->tclass && r->tclass != ip6_tclass(fl6->flowlabel))
                return 0;
 
        return 1;
@@ -321,7 +322,9 @@ out_fib6_rules_ops:
 
 static void __net_exit fib6_rules_net_exit(struct net *net)
 {
+       rtnl_lock();
        fib_rules_unregister(net->ipv6.fib6_rules_ops);
+       rtnl_unlock();
 }
 
 static struct pernet_operations fib6_rules_net_ops = {
This page took 0.027531 seconds and 5 git commands to generate.