mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Fall back from --bind-dynamic to --bind-interfaces in BSD, rather than quitting.
This commit is contained in:
@@ -115,8 +115,13 @@ int main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
/* -- bind-dynamic not supported on !Linux, fall back to --bind-interfaces */
|
||||||
if (option_bool(OPT_CLEVERBIND))
|
if (option_bool(OPT_CLEVERBIND))
|
||||||
die(_("--bind-dynamic not available on this platform"), NULL, EC_BADCONF);
|
{
|
||||||
|
bind_fallback = 1;
|
||||||
|
set_option_bool(OPT_NOWILD);
|
||||||
|
reset_option_bool(OPT_CLVERBIND);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_TFTP
|
#ifndef HAVE_TFTP
|
||||||
|
|||||||
@@ -932,6 +932,7 @@ char *option_string(int prot, unsigned int opt, unsigned char *val,
|
|||||||
int opt_len, char *buf, int buf_len);
|
int opt_len, char *buf, int buf_len);
|
||||||
void reread_dhcp(void);
|
void reread_dhcp(void);
|
||||||
void set_option_bool(unsigned int opt);
|
void set_option_bool(unsigned int opt);
|
||||||
|
void reset_option_bool(unsigned int opt);
|
||||||
struct hostsfile *expand_filelist(struct hostsfile *list);
|
struct hostsfile *expand_filelist(struct hostsfile *list);
|
||||||
|
|
||||||
/* forward.c */
|
/* forward.c */
|
||||||
|
|||||||
@@ -1119,6 +1119,14 @@ void set_option_bool(unsigned int opt)
|
|||||||
daemon->options2 |= 1u << (opt - 32);
|
daemon->options2 |= 1u << (opt - 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void reset_option_bool(unsigned int opt)
|
||||||
|
{
|
||||||
|
if (opt < 32)
|
||||||
|
daemon->options &= ~(1u << opt);
|
||||||
|
else
|
||||||
|
daemon->options2 &= ~(1u << (opt - 32));
|
||||||
|
}
|
||||||
|
|
||||||
static char *one_opt(int option, char *arg, char *gen_prob, int command_line)
|
static char *one_opt(int option, char *arg, char *gen_prob, int command_line)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|||||||
Reference in New Issue
Block a user