diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index abca870d8ff69fe76a19bef7d9338d4f80fabaf0..48cd88e625539cb7b94b34747233d57c1543bcee 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1249,6 +1249,9 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, if (noblock) return -EAGAIN; + + /* starting over for a new packet */ + msg->msg_flags &= ~MSG_TRUNC; goto try_again; } diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 1e7a43f500ab5fac6a1f5d97af09aa49fd2c5249..328985c408838ad9e50fb1e209cc4f9c592a56a3 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -455,6 +455,9 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk, if (noblock) return -EAGAIN; + + /* starting over for a new packet */ + msg->msg_flags &= ~MSG_TRUNC; goto try_again; }