]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/ipv4/fib_rules.c
[NET] NETNS: Omit sock->sk_net without CONFIG_NET_NS.
[mirror_ubuntu-bionic-kernel.git] / net / ipv4 / fib_rules.c
index 19274d01afa4a36c3777b5ff34816fa63783734a..1fb56876be54ab77f035abbd0afd51618edb2da8 100644 (file)
@@ -137,7 +137,7 @@ static int fib4_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
                               struct nlmsghdr *nlh, struct fib_rule_hdr *frh,
                               struct nlattr **tb)
 {
-       struct net *net = skb->sk->sk_net;
+       struct net *net = sock_net(skb->sk);
        int err = -EINVAL;
        struct fib4_rule *rule4 = (struct fib4_rule *) rule;