aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/devinet.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r--net/ipv4/devinet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 823c724a8593..6848e4760f34 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -437,7 +437,7 @@ struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, __be32 prefix,
437 437
438static int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 438static int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
439{ 439{
440 struct net *net = skb->sk->sk_net; 440 struct net *net = sock_net(skb->sk);
441 struct nlattr *tb[IFA_MAX+1]; 441 struct nlattr *tb[IFA_MAX+1];
442 struct in_device *in_dev; 442 struct in_device *in_dev;
443 struct ifaddrmsg *ifm; 443 struct ifaddrmsg *ifm;
@@ -552,7 +552,7 @@ errout:
552 552
553static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) 553static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
554{ 554{
555 struct net *net = skb->sk->sk_net; 555 struct net *net = sock_net(skb->sk);
556 struct in_ifaddr *ifa; 556 struct in_ifaddr *ifa;
557 557
558 ASSERT_RTNL(); 558 ASSERT_RTNL();
@@ -1158,7 +1158,7 @@ nla_put_failure:
1158 1158
1159static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) 1159static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
1160{ 1160{
1161 struct net *net = skb->sk->sk_net; 1161 struct net *net = sock_net(skb->sk);
1162 int idx, ip_idx; 1162 int idx, ip_idx;
1163 struct net_device *dev; 1163 struct net_device *dev;
1164 struct in_device *in_dev; 1164 struct in_device *in_dev;