Files
xrdp/common
Matt Cunningham fcc5bd79ea g_tcp_connect fix:
- add addr_is_ipv4 helper function
- add addr_is_ipv6 helper function
- add get_socket_family helper function
- g_tcp_connect:
  - #define for MAX_PORT_STR length
  - create *addr_arg char that is used in getaddrinfo so we can do any last-minute changes directly
  - add chars host and service which are primarily used for debug logging of attempted connection points
  - calls get_socket_family to discover family of socket
  - add switch case logic for AF_INET6/4:
    - v4: just calls addr_is_ipv6 so we don't fail on a hostname input
    - v6: drop addrconfig flag and add AI_ALL so we can try to map ipv4 destinations against ipv6 socket to support varied configurations we could see
    - if an ipv4 address comes in against an ipv6 socket, we map it to try and connect anyways
  - getaddrinfo now calls addr_arg so it picks up changes that an ipv6-case may have done
  - before calling connect, use getnameinfo to get logging values for the actual host ip/port we are about to attempt a connect on - I found this useful when debugging so thought it had value to keep
- change if (res > -1) to if (res == 0): the bsd man pages for getaddrinfo only promise that it returns 0 on success, so it seems sensible to me to cover the event that an error code could be positive, which freebsd has some positive EAI_* errors based on this: https://github.com/freebsd/freebsd-src/blob/main/lib/libc/net/gai_strerror.c
- remove connect_loopback entirely:  this had several bits of logic handling ipv6 and ipv4 mixing already and ended up being redundant because of the restructuring of g_tcp_connect, which covers direct ip address char* inputs now
- add comment about OSX to IPv6 function for clarity
2026-03-23 08:21:29 -04:00
..
2022-09-03 02:01:48 +00:00
2022-01-28 12:23:40 +00:00
2023-05-22 14:43:22 +01:00
2023-05-22 14:43:22 +01:00
2025-02-27 15:04:11 +00:00
2025-02-27 15:04:11 +00:00
2024-11-08 15:57:40 +00:00
2024-11-08 15:57:40 +00:00
2023-03-14 02:02:09 -04:00
2023-10-26 15:17:17 +01:00
2020-01-06 15:46:37 +00:00
2022-09-03 02:01:48 +00:00
2020-01-06 15:46:37 +00:00
2020-01-06 15:46:37 +00:00
2026-03-23 08:21:29 -04:00
2025-11-21 12:33:38 +00:00
2023-10-18 10:07:49 +01:00
2025-04-22 14:51:26 +01:00
2024-08-05 10:44:10 +01:00
2025-07-07 15:02:51 +01:00
2025-07-07 15:02:51 +01:00
2025-02-14 11:57:42 +00:00
2025-08-22 12:29:20 +01:00
2023-10-18 10:07:49 +01:00
2014-07-25 22:24:40 -07:00
2024-08-05 10:44:10 +01:00