Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/dcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ void dcc_telnet_hostresolved2(int i, int idx) {
/* Skip ident lookup if disabled */
if (identtimeout <= 0) {
dcc[i].u.ident_sock = dcc[idx].sock;
dcc_telnet_got_ident(i, dcc[idx].host);
dcc_telnet_got_ident(i, dcc[i].host);
return;
}

Expand Down Expand Up @@ -1392,7 +1392,7 @@ void dcc_telnet_hostresolved2(int i, int idx) {
static void dcc_telnet_hostresolved(int i)
{
int idx;
char s[sizeof lasttelnethost];
char s[sizeof lasttelnethost], *userhost;

debug0("dcc_telnet_hostresolved()");
strlcpy(dcc[i].host, dcc[i].u.dns->host, UHOSTLEN);
Expand Down Expand Up @@ -1442,11 +1442,14 @@ static void dcc_telnet_hostresolved(int i)
}
#endif

userhost = s + strlen("-telnet!");

/* Skip ident lookup for public script listeners */
if ((dcc[idx].status & LSTN_PUBLIC) && !strcmp(dcc[idx].nick, "(script)")) {
changeover_dcc(i, &DCC_SOCKET, 0);
dcc[i].u.other = NULL;
strcpy(dcc[i].nick, "*");
strlcpy(dcc[i].host, userhost, UHOSTLEN);
check_tcl_listen(dcc[idx].host, dcc[i].sock);
return;
}
Expand All @@ -1459,6 +1462,7 @@ static void dcc_telnet_hostresolved(int i)
}
#endif /* TLS */

strlcpy(dcc[i].host, userhost, UHOSTLEN);
dcc_telnet_hostresolved2(i, idx);
}

Expand Down
Loading