aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 5944d7d668dd..44f6a20fa29d 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -999,7 +999,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
999 err = PTR_ERR(rt); 999 err = PTR_ERR(rt);
1000 rt = NULL; 1000 rt = NULL;
1001 if (err == -ENETUNREACH) 1001 if (err == -ENETUNREACH)
1002 IP_INC_STATS_BH(net, IPSTATS_MIB_OUTNOROUTES); 1002 IP_INC_STATS(net, IPSTATS_MIB_OUTNOROUTES);
1003 goto out; 1003 goto out;
1004 } 1004 }
1005 1005
@@ -1098,6 +1098,9 @@ int udp_sendpage(struct sock *sk, struct page *page, int offset,
1098 struct udp_sock *up = udp_sk(sk); 1098 struct udp_sock *up = udp_sk(sk);
1099 int ret; 1099 int ret;
1100 1100
1101 if (flags & MSG_SENDPAGE_NOTLAST)
1102 flags |= MSG_MORE;
1103
1101 if (!up->pending) { 1104 if (!up->pending) {
1102 struct msghdr msg = { .msg_flags = flags|MSG_MORE }; 1105 struct msghdr msg = { .msg_flags = flags|MSG_MORE };
1103 1106
@@ -1236,7 +1239,7 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
1236 bool slow; 1239 bool slow;
1237 1240
1238 if (flags & MSG_ERRQUEUE) 1241 if (flags & MSG_ERRQUEUE)
1239 return ip_recv_error(sk, msg, len); 1242 return ip_recv_error(sk, msg, len, addr_len);
1240 1243
1241try_again: 1244try_again:
1242 skb = __skb_recv_datagram(sk, flags | (noblock ? MSG_DONTWAIT : 0), 1245 skb = __skb_recv_datagram(sk, flags | (noblock ? MSG_DONTWAIT : 0),