Repository navigation
Commit 56e1791
rest_client: guard fd selection against libcurl wakeup eventfd
curl_multi_fdset()'s read set can include libcurl's own wakeup eventfd
alongside the real transfer socket (observed on 8.21.0, not 8.17.0).
is_new_transfer() only checks fd numbers, not fd type, so it could
register the eventfd instead of the socket. Add a SO_TYPE check before
trusting a candidate fd.
Also zero wset/eset before curl_multi_fdset(), and improve the sanity
check on `connect_poll_interval` modparam.
(cherry picked from commit 54edbe6)1 parent 777caad commit 56e1791
2 files changed
Lines changed: 27 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
348 | 368 | | |
349 | 369 | | |
350 | 370 | | |
| |||
963 | 983 | | |
964 | 984 | | |
965 | 985 | | |
| 986 | + | |
| 987 | + | |
966 | 988 | | |
967 | 989 | | |
968 | 990 | | |
| |||
973 | 995 | | |
974 | 996 | | |
975 | 997 | | |
976 | | - | |
| 998 | + | |
| 999 | + | |
977 | 1000 | | |
978 | 1001 | | |
979 | 1002 | | |
| |||
1113 | 1136 | | |
1114 | 1137 | | |
1115 | 1138 | | |
| 1139 | + | |
| 1140 | + | |
1116 | 1141 | | |
1117 | 1142 | | |
1118 | 1143 | | |
| |||
0 commit comments