Skip to content

Commit

Permalink
resolve name at connection time for UDP too
Browse files Browse the repository at this point in the history
  • Loading branch information
yrutschle committed Sep 12, 2023
1 parent c2551c0 commit e0f15a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions udp-listener.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ static void mark_active(struct connection* cnx)
/* Creates a new non-blocking socket */
static int nonblocking_socket(struct sslhcfg_protocols_item* proto)
{
if (proto->resolve_on_forward) {
resolve_split_name(&(proto->saddr), proto->host,
proto->port);
}

int out = socket(proto->saddr->ai_family, SOCK_DGRAM, 0);
int res = set_nonblock(out);
if (res == -1) {
Expand Down

0 comments on commit e0f15a3

Please sign in to comment.