ftp PORT: don't hang if bind() fails
authorDaniel Stenberg <daniel@haxx.se>
Sun, 6 Nov 2011 15:53:07 +0000 (16:53 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 6 Nov 2011 22:02:27 +0000 (23:02 +0100)
commite3166df1bb3e027e20455c7b99b42779e607ccfb
treee9f5ae191e6888f8c038aa6bf79945a7a1c47713
parent06a83e805070b01e8c8ebffb1f6b56e113b1810a
ftp PORT: don't hang if bind() fails

When the user requests PORT with a specific port or port range, the code
could lock up in an endless loop. There's now an extra conditional that
makes sure to special treat the error and try the local address only
once so a second failure will abort the loop correctly.

Bug: http://curl.haxx.se/bug/view.cgi?id=3433968
Reported by: Gokhan Sengun
lib/ftp.c