ip-alias: add option -no-ipalias for domain-rules
This commit is contained in:
@@ -3031,6 +3031,11 @@ static int _conf_domain_rule_no_cache(const char *domain)
|
||||
return _config_domain_rule_flag_set(domain, DOMAIN_FLAG_NO_CACHE, 0);
|
||||
}
|
||||
|
||||
static int _conf_domain_rule_no_ipalias(const char *domain)
|
||||
{
|
||||
return _config_domain_rule_flag_set(domain, DOMAIN_FLAG_NO_IPALIAS, 0);
|
||||
}
|
||||
|
||||
static int _conf_domain_rules(void *data, int argc, char *argv[])
|
||||
{
|
||||
int opt = 0;
|
||||
@@ -3056,6 +3061,7 @@ static int _conf_domain_rules(void *data, int argc, char *argv[])
|
||||
{"no-serve-expired", no_argument, NULL, 254},
|
||||
{"delete", no_argument, NULL, 255},
|
||||
{"no-cache", no_argument, NULL, 256},
|
||||
{"no-ip-alias", no_argument, NULL, 257},
|
||||
{NULL, no_argument, NULL, 0}
|
||||
};
|
||||
/* clang-format on */
|
||||
@@ -3211,6 +3217,14 @@ static int _conf_domain_rules(void *data, int argc, char *argv[])
|
||||
|
||||
break;
|
||||
}
|
||||
case 257: {
|
||||
if (_conf_domain_rule_no_ipalias(domain) != 0) {
|
||||
tlog(TLOG_ERROR, "set no-ipalias rule failed.");
|
||||
goto errout;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user