summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorXufeng Zhang <xufeng.zhang@windriver.com>2011-06-21 10:43:40 +0000
committerDavid S. Miller <davem@davemloft.net>2011-06-21 22:34:27 -0700
commit9cfaa8def1c795a512bc04f2aec333b03724ca2e (patch)
tree2c4bff0afe8424472b780a65a8d356db2d62caf4 /net
parent32c90254ed4a0c698caa0794ebb4de63fcc69631 (diff)
udp/recvmsg: Clear MSG_TRUNC flag when starting over for a new packet
Consider this scenario: When the size of the first received udp packet is bigger than the receive buffer, MSG_TRUNC bit is set in msg->msg_flags. However, if checksum error happens and this is a blocking socket, it will goto try_again loop to receive the next packet. But if the size of the next udp packet is smaller than receive buffer, MSG_TRUNC flag should not be set, but because MSG_TRUNC bit is not cleared in msg->msg_flags before receive the next packet, MSG_TRUNC is still set, which is wrong. Fix this problem by clearing MSG_TRUNC flag when starting over for a new packet. Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/udp.c3
-rw-r--r--net/ipv6/udp.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index abca870d8ff6..48cd88e62553 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1249,6 +1249,9 @@ csum_copy_err:
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 1e7a43f500ab..328985c40883 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -455,6 +455,9 @@ csum_copy_err:
if (noblock)
return -EAGAIN;
+
+ /* starting over for a new packet */
+ msg->msg_flags &= ~MSG_TRUNC;
goto try_again;
}
n> Unnamed repository; edit this file to name it for gitweb.root
summaryrefslogtreecommitdiff
path: root/translations
AgeCommit message (Expand)AuthorFilesLines
2012-02-21fix build breaker in pl helpAndras Timar1-1/+1
2012-02-21Close correctly a tagFridrich Štrba1-1/+1
2012-02-21Ballance quote marksFridrich Štrba1-1/+1
2012-02-20update translations for LibreOffice 3.5.1 rc1Andras Timar1809-18927/+11610
2012-01-30update translations for LibreOffice 3.5 rc3Andras Timar2640-22261/+42524
2012-01-23update translations for LibreOffice 3.5 rc2Andras Timar8483-15690/+17400
2012-01-21fdo#45037 remove ~Andras Timar2-4/+4
2012-01-16update translations for LibreOffice 3.5 rc1Andras Timar10111-24008/+23904
2012-01-08update translations for LibreOffice 3.5 beta3Andras Timar12149-106050/+50764
2011-12-19update sl translation for LibreOffice 3.5 beta2Andras Timar327-2609/+2335
2011-12-19update translations for LibreOffice 3.5 beta2Andras Timar11365-98738/+95705
2011-12-19remove obsolete filesAndras Timar424-179613/+0
2011-12-05update translations for LibreOffice 3.5 beta1libreoffice-3-5-branch-pointAndras Timar618-6621/+5251
2011-11-28update translations for LibreOffice 3.5 beta0Andras Timar30720-254727/+207369
2011-11-08changed localize tool syntaxAndras Timar1-2/+2
2011-11-07extend PYTHONPATH like a drunken crazy; perhaps it helps ...Michael Meeks1-2/+6
2011-11-06fix build with internal python on Windows, tooAndras Timar1-1/+1
2011-11-03translate-toolkit has gone...Andras Timar1-1/+1
2011-11-03fix build with internal pythonAndras Timar2-1/+5
2011-11-03extension description translations (bg, fr, pt-BR) for testingAndras Timar150-587/+1070
2011-11-02remove obsolete SYSTEM_TRANSLATE_TOOLKIT checkRene Engelhard1-24/+0
2011-10-31fix location of pdfimport translationsAndras Timar106-0/+0
2011-10-17Trying blindly to fix win32 buildFridrich Štrba1-1/+1
2011-10-08update all langsAndras Timar