Skip to content

Commit e134547

Browse files
committed
update nonblocking for outbound TLS, too
set this->nonblock if home-tls is set when deleting listeners from a home->listener tree, just delete them always, and don't check the non-block flag
1 parent cf8492c commit e134547

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/listen.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3715,7 +3715,8 @@ rad_listen_t *proxy_new_listener(TALLOC_CTX *ctx, home_server_t *home, uint16_t
37153715

37163716
#ifdef WITH_TLS
37173717
this->nonblock |= home->nonblock;
3718-
this->nonblock |= (this->tls != NULL); // TLS connections are always nonblocking.
3718+
this->nonblock |= (this->tls != NULL); // incoming TLS connections are always nonblocking.
3719+
this->nonblock |= (home->tls != NULL); // outgoing TLS connections are always nonblocking
37193720
#endif
37203721

37213722
/*
@@ -3890,7 +3891,7 @@ rad_listen_t *proxy_new_listener(TALLOC_CTX *ctx, home_server_t *home, uint16_t
38903891
close(this->fd);
38913892
home->last_failed_open = now;
38923893
#ifdef WITH_TLS
3893-
if (home->listeners && this->nonblock) rbtree_deletebydata(home->listeners, this);
3894+
if (home->listeners) rbtree_deletebydata(home->listeners, this);
38943895
#endif
38953896
listen_free(&this);
38963897
return NULL;

0 commit comments

Comments
 (0)