{"author":"Stefan Eissing","author_email":"stefan@eissing.org","author_time":1747650358,"commit_time":1747745357,"committer":"Daniel Stenberg","committer_email":"daniel@haxx.se","hash":"be45e014c6ae82ae7752ca874ecefdc5bbc000fa","message":"dns_entry: move from conn to data->state\n\nThe `struct Curl_dns_entry *` used to established a connection\ndo not have the connection's lifetime, but the transfer's lifetime\n(of the transfer that initiates the connect).\n\n`Curl_dns_entry *` is reference counted with the \"dns cache\". That\ncache might be owned by the multi or the transfer's share. In the\nshare, the reference count needs updating under lock.\n\nTherefore, the dns entry can only be kept *and* released using the\nsame transfer it was initially looked up from. But a connection is\noften discarded using another transfer.\n\nSo far, the problem of this has been avoided in clearing the connection's\ndns entries in the \"multi_don()\" handling. So, connections had NULL\ndns entries after the initial transfers and its connect had been handled.\n\nKeeping the dns entries in data->state seems therefore a better choice.\n\nAlso: remove the `struct Curl_dns_entry *` from the connect filters\ncontexts. Use `data->state.dns` every time instead and fail correctly\nwhen not present and needed.\n\nCloses #17383\n","parents":["3ec6aa5c07407d96ca2b3fc8a95d16cb16826ef6"],"tree_hash":"11d99582c2b280a7fc1244a958ed02417d449e5d"}