Add --tftp-single-port option.

This commit is contained in:
Simon Kelley
2020-01-05 16:21:24 +00:00
parent 18a6bdd541
commit 66f62650c3
6 changed files with 113 additions and 64 deletions

View File

@@ -1107,7 +1107,7 @@ int main (int argc, char **argv)
#endif
/* must do this just before select(), when we know no
/* must do this just before do_poll(), when we know no
more calls to my_syslog() can occur */
set_log_writer();
@@ -1670,11 +1670,12 @@ static int set_dns_listeners(time_t now)
#ifdef HAVE_TFTP
int tftp = 0;
struct tftp_transfer *transfer;
for (transfer = daemon->tftp_trans; transfer; transfer = transfer->next)
{
tftp++;
poll_listen(transfer->sockfd, POLLIN);
}
if (!option_bool(OPT_SINGLE_PORT))
for (transfer = daemon->tftp_trans; transfer; transfer = transfer->next)
{
tftp++;
poll_listen(transfer->sockfd, POLLIN);
}
#endif
/* will we be able to get memory? */