|
@@ -607,7 +607,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
|
|
|
|
|
|
ipc.oif = sk->sk_bound_dev_if;
|
|
|
if (msg->msg_controllen) {
|
|
|
- err = ip_cmsg_send(&init_net, msg, &ipc);
|
|
|
+ err = ip_cmsg_send(sk->sk_net, msg, &ipc);
|
|
|
if (err)
|
|
|
return err;
|
|
|
if (ipc.opt)
|
|
@@ -656,7 +656,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
|
|
|
{ .sport = inet->sport,
|
|
|
.dport = dport } } };
|
|
|
security_sk_classify_flow(sk, &fl);
|
|
|
- err = ip_route_output_flow(&init_net, &rt, &fl, sk, 1);
|
|
|
+ err = ip_route_output_flow(sk->sk_net, &rt, &fl, sk, 1);
|
|
|
if (err) {
|
|
|
if (err == -ENETUNREACH)
|
|
|
IP_INC_STATS_BH(IPSTATS_MIB_OUTNOROUTES);
|