<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/curl.git/lib/multi.c, branch bagder/ftp-over-httpsproxy</title>
<subtitle>github.com: bagder/curl.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/'/>
<entry>
<title>multi: align WinSock mask variables in Curl_multi_wait</title>
<updated>2020-09-17T05:41:14+00:00</updated>
<author>
<name>Marc Hoersken</name>
<email>info@marc-hoersken.de</email>
</author>
<published>2020-09-12T20:02:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=1060955a617dceddeccf6ba1505fe92df317d40b'/>
<id>1060955a617dceddeccf6ba1505fe92df317d40b</id>
<content type='text'>
Also skip pre-checking sockets to set timeout_ms to 0
after the first socket has been detected to be ready.

Reviewed-by: rcombs on github
Reviewed-by: Daniel Stenberg

Follow up to #5886
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also skip pre-checking sockets to set timeout_ms to 0
after the first socket has been detected to be ready.

Reviewed-by: rcombs on github
Reviewed-by: Daniel Stenberg

Follow up to #5886
</pre>
</div>
</content>
</entry>
<entry>
<title>multi: reuse WinSock events variable in Curl_multi_wait</title>
<updated>2020-09-17T05:40:49+00:00</updated>
<author>
<name>Marc Hoersken</name>
<email>info@marc-hoersken.de</email>
</author>
<published>2020-09-12T19:59:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=40d67da7caaef4c23399306cbcac7883a925ce6f'/>
<id>40d67da7caaef4c23399306cbcac7883a925ce6f</id>
<content type='text'>
Since the struct is quite large (1 long and 10 ints) we
declare it once at the beginning of the function instead
of multiple times inside loops to avoid stack movements.

Reviewed-by: Viktor Szakats
Reviewed-by: Daniel Stenberg

Closes #5886
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the struct is quite large (1 long and 10 ints) we
declare it once at the beginning of the function instead
of multiple times inside loops to avoid stack movements.

Reviewed-by: Viktor Szakats
Reviewed-by: Daniel Stenberg

Closes #5886
</pre>
</div>
</content>
</entry>
<entry>
<title>hash: make it 'struct Curl_hash'</title>
<updated>2020-09-02T20:41:58+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-09-02T10:07:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=9e90ff0839a2ad750faad0d8176cd7cc01c1dae2'/>
<id>9e90ff0839a2ad750faad0d8176cd7cc01c1dae2</id>
<content type='text'>
As internal global names should use captical C.

Closes #5906
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As internal global names should use captical C.

Closes #5906
</pre>
</div>
</content>
</entry>
<entry>
<title>llist: make it "struct Curl_llist"</title>
<updated>2020-09-02T20:41:58+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-09-02T10:06:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=9b3f888a00fe0c796e8ef7f00d03bb2adc2baa4e'/>
<id>9b3f888a00fe0c796e8ef7f00d03bb2adc2baa4e</id>
<content type='text'>
As internal global names should use captical C.

Closes #5906
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As internal global names should use captical C.

Closes #5906
</pre>
</div>
</content>
</entry>
<entry>
<title>multi: handle connection state winsock events</title>
<updated>2020-08-28T15:57:52+00:00</updated>
<author>
<name>Marc Hoersken</name>
<email>info@marc-hoersken.de</email>
</author>
<published>2020-08-26T20:13:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=003e81e2a3d2e72c2319ef9bd285141fe02e0b26'/>
<id>003e81e2a3d2e72c2319ef9bd285141fe02e0b26</id>
<content type='text'>
Learn from the way Cygwin handles and maps the WinSock events
to simulate correct and complete poll and select behaviour
according to Richard W. Stevens Network Programming book.

Reviewed-by: Jay Satiro
Reviewed-by: Marcel Raad

Follow up to #5634
Closes #5867
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Learn from the way Cygwin handles and maps the WinSock events
to simulate correct and complete poll and select behaviour
according to Richard W. Stevens Network Programming book.

Reviewed-by: Jay Satiro
Reviewed-by: Marcel Raad

Follow up to #5634
Closes #5867
</pre>
</div>
</content>
</entry>
<entry>
<title>Curl_pgrsTime - return new time to avoid timeout integer overflow</title>
<updated>2020-08-28T12:16:41+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-08-24T09:07:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=a2c85bb8e4ba9fa94b88c7592766763e30379ed2'/>
<id>a2c85bb8e4ba9fa94b88c7592766763e30379ed2</id>
<content type='text'>
Setting a timeout to INT_MAX could cause an immediate error to get
returned as timeout because of an overflow when different values of
'now' were used.

This is primarily fixed by having Curl_pgrsTime() return the "now" when
TIMER_STARTSINGLE is set so that the parent function will continue using
that time.

Reported-by: Ionuț-Francisc Oancea
Fixes #5583
Closes #5847
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Setting a timeout to INT_MAX could cause an immediate error to get
returned as timeout because of an overflow when different values of
'now' were used.

This is primarily fixed by having Curl_pgrsTime() return the "now" when
TIMER_STARTSINGLE is set so that the parent function will continue using
that time.

Reported-by: Ionuț-Francisc Oancea
Fixes #5583
Closes #5847
</pre>
</div>
</content>
</entry>
<entry>
<title>multi: expand pre-check for socket readiness</title>
<updated>2020-08-25T10:11:45+00:00</updated>
<author>
<name>Marc Hoersken</name>
<email>info@marc-hoersken.de</email>
</author>
<published>2020-07-26T19:26:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=3334ee6bcb2b23c583f4601dc24d122bb9719f17'/>
<id>3334ee6bcb2b23c583f4601dc24d122bb9719f17</id>
<content type='text'>
Check readiness of all sockets before waiting on them
to avoid locking in case the one-time event FD_WRITE
was already consumed by a previous wait operation.

More information about WinSock network events:
https://docs.microsoft.com/en-us/windows/win32/api/
   winsock2/nf-winsock2-wsaeventselect#return-value

Closes #5634
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check readiness of all sockets before waiting on them
to avoid locking in case the one-time event FD_WRITE
was already consumed by a previous wait operation.

More information about WinSock network events:
https://docs.microsoft.com/en-us/windows/win32/api/
   winsock2/nf-winsock2-wsaeventselect#return-value

Closes #5634
</pre>
</div>
</content>
</entry>
<entry>
<title>multi: implement wait using winsock events</title>
<updated>2020-08-25T10:11:24+00:00</updated>
<author>
<name>rcombs</name>
<email>rcombs@rcombs.me</email>
</author>
<published>2020-05-13T23:49:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=d2a7d7c185f98df8f3e585e5620cbc0482e45fac'/>
<id>d2a7d7c185f98df8f3e585e5620cbc0482e45fac</id>
<content type='text'>
This avoids using a pair of TCP ports to provide wakeup functionality
for every multi instance on Windows, where socketpair() is emulated
using a TCP socket on loopback which could in turn lead to socket
resource exhaustion.

A previous version of this patch failed to account for how in WinSock,
FD_WRITE is set only once when writing becomes possible and not again
until after a send has failed due to the buffer filling. This contrasts
to how FD_READ and FD_OOB continue to be set until the conditions they
refer to no longer apply. This meant that if a user wrote some data to
a socket, but not enough data to completely fill its send buffer, then
waited on that socket to become writable, we'd erroneously stall until
their configured timeout rather than returning immediately.

This version of the patch addresses that issue by checking each socket
we're waiting on to become writable with select() before the wait, and
zeroing the timeout if it's already writable.

Assisted-by: Marc Hörsken
Reviewed-by: Marcel Raad
Reviewed-by: Daniel Stenberg
Tested-by: Gergely Nagy
Tested-by: Rasmus Melchior Jacobsen
Tested-by: Tomas Berger

Replaces #5397
Reverts #5632
Closes #5634
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This avoids using a pair of TCP ports to provide wakeup functionality
for every multi instance on Windows, where socketpair() is emulated
using a TCP socket on loopback which could in turn lead to socket
resource exhaustion.

A previous version of this patch failed to account for how in WinSock,
FD_WRITE is set only once when writing becomes possible and not again
until after a send has failed due to the buffer filling. This contrasts
to how FD_READ and FD_OOB continue to be set until the conditions they
refer to no longer apply. This meant that if a user wrote some data to
a socket, but not enough data to completely fill its send buffer, then
waited on that socket to become writable, we'd erroneously stall until
their configured timeout rather than returning immediately.

This version of the patch addresses that issue by checking each socket
we're waiting on to become writable with select() before the wait, and
zeroing the timeout if it's already writable.

Assisted-by: Marc Hörsken
Reviewed-by: Marcel Raad
Reviewed-by: Daniel Stenberg
Tested-by: Gergely Nagy
Tested-by: Rasmus Melchior Jacobsen
Tested-by: Tomas Berger

Replaces #5397
Reverts #5632
Closes #5634
</pre>
</div>
</content>
</entry>
<entry>
<title>Curl_easy: remember last connection by id, not by pointer</title>
<updated>2020-08-17T12:33:09+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-08-16T09:34:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=3c9e021f86872baae412a427e807fbfa2f3e8a22'/>
<id>3c9e021f86872baae412a427e807fbfa2f3e8a22</id>
<content type='text'>
CVE-2020-8231

Bug: https://curl.haxx.se/docs/CVE-2020-8231.html

Reported-by: Marc Aldorasi
Closes #5824
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CVE-2020-8231

Bug: https://curl.haxx.se/docs/CVE-2020-8231.html

Reported-by: Marc Aldorasi
Closes #5824
</pre>
</div>
</content>
</entry>
<entry>
<title>multi: Remove 10-year old out-commented code</title>
<updated>2020-08-12T13:28:46+00:00</updated>
<author>
<name>Emil Engler</name>
<email>me@emilengler.com</email>
</author>
<published>2020-08-12T09:58:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=da901fefe099708d81de6c413838ca9f1f48cbda'/>
<id>da901fefe099708d81de6c413838ca9f1f48cbda</id>
<content type='text'>
The code hasn't been touched since 2010-08-18

Closes #5805
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The code hasn't been touched since 2010-08-18

Closes #5805
</pre>
</div>
</content>
</entry>
</feed>
