[NET] NETNS: Omit sock->sk_net without CONFIG_NET_NS.
[firefly-linux-kernel-4.4.55.git] / net / ipv6 / fib6_rules.c
index e7a7fe26cebff9933fc9cf0e009b039c5f5c94d2..cac580749ebeeb2608f59bb4876cc552c3fc4eb2 100644 (file)
@@ -154,7 +154,7 @@ static int fib6_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
                               struct nlattr **tb)
 {
        int err = -EINVAL;
-       struct net *net = skb->sk->sk_net;
+       struct net *net = sock_net(skb->sk);
        struct fib6_rule *rule6 = (struct fib6_rule *) rule;
 
        if (rule->action == FR_ACT_TO_TBL) {