Package: nstx Version: 1.1-beta6-6 Severity: normal Tags: patch Justification: Policy 9.3.2 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu maverick ubuntu-patch
Hello, In ubuntu we applied the attached patch and we think you're interested to apply it too. The purpose of this patch is to fix ignoring the return value of a possible short write in nstx_tuntap.c. Thanks.
## fix-return-values.dpatch by <sistp...@ubuntu.com> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: No description. --- nstx-1.1-beta6~/nstx_tuntap.c 2009-10-10 13:57:50.000000000 +0200 +++ nstx-1.1-beta6/nstx_tuntap.c 2009-10-10 13:58:17.000000000 +0200 @@ -266,7 +266,21 @@ sendtun(const char *data, size_t len) { // printf("Sent len %d, csum %d\n", len, checksum(data, len)); - write(tfd, data, len); + + size_t count; + ssize_t ret; + + for (count = 0; count < len; count += ret) { + ret = write(tfd, data + count, len - count); + + if (ret < 0) { + if (errno == EINTR) { + ret = 0; + continue; + } + return; + } + } } void