Remove dial on demand

dialer ran a program when a name could not be resolved, for dial-up
links; with nscache it did not even run. The command is still accepted
and ignored, so configurations using it keep loading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Vladimir DubrovinandClaude Opus 5.5 committed 2026-10-13 15:36:23 +03:00
1 parent ca0b5e0c88
commit 18c0ebda0f
5 files changed
+6 -18

No files matched your search

-7
View File
@@ -288,7 +288,6 @@ struct extparam conf = {
.filters = NULL,
.authfuncs = NULL,
.stdlog = NULL,
.demanddialprog = NULL,
.stringtable = NULL,
.logtime = (time_t)0,
.time = (time_t)0,
@@ -956,8 +955,6 @@ uint32_t getip(unsigned char *name){
}
}
if((tmpresolv=resolvfunc)){
if((*tmpresolv)(AF_INET, name, (unsigned char *)&retval)) return retval;
if(conf.demanddialprog) system(conf.demanddialprog);
return (*tmpresolv)(AF_INET, name, (unsigned char *)&retval)?retval:0;
}
#ifndef NOSTDRESOLVE
@@ -969,10 +966,6 @@ uint32_t getip(unsigned char *name){
_3proxy_mutex_lock(&gethostbyname_mutex);
#endif
hp=gethostbyname((char *)name);
if (!hp && conf.demanddialprog) {
system(conf.demanddialprog);
hp=gethostbyname((char *)name);
}
retval = hp?*(uint32_t *)hp->h_addr:0;
#if !defined(_WIN32) && !defined(GETHOSTBYNAME_R)
_3proxy_mutex_unlock(&gethostbyname_mutex);
+2 -2
View File
@@ -757,9 +757,9 @@ static int h_nsrecord(int argc, unsigned char **argv){
return 0;
}
/* dialer: running a program when a name does not resolve is gone; the
command is still taken, and ignored, so configurations keep loading */
static int h_dialer(int argc, unsigned char **argv){
if(conf.demanddialprog) free(conf.demanddialprog);
conf.demanddialprog = strdup((char *)argv[1]);
return 0;
}
-1
View File
@@ -882,7 +882,6 @@ struct extparam {
struct filter * filters;
struct auth *authfuncs;
FILE *stdlog;
char* demanddialprog;
unsigned char **stringtable;
time_t logtime, time;
unsigned logdumpsrv, logdumpcli;