mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- applied patch to support outgoing-interface with ub_ctx_set_option.
git-svn-id: file:///svn/unbound/trunk@2596 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
c480290a30
commit
b54efa5c69
2 changed files with 13 additions and 1 deletions
|
|
@ -2,6 +2,7 @@
|
|||
- Tag 1.4.15 (same as 1.4.15rc1), for 1.4.15 release.
|
||||
- trunk 1.4.16; includes changes memset testcode, #424 openindiana,
|
||||
and keyfile write fixup.
|
||||
- applied patch to support outgoing-interface with ub_ctx_set_option.
|
||||
|
||||
23 January 2012: Wouter
|
||||
- Fix memset in test code.
|
||||
|
|
|
|||
|
|
@ -409,7 +409,18 @@ int config_set_option(struct config_file* cfg, const char* opt,
|
|||
else S_STR("control-cert-file:", control_cert_file)
|
||||
else S_STR("module-config:", module_conf)
|
||||
else S_STR("python-script:", python_script)
|
||||
else {
|
||||
else if (strcmp(opt, "outgoing-interface:") == 0) {
|
||||
char* d = strdup(val);
|
||||
char** oi = (char**)malloc((cfg->num_out_ifs+1)*sizeof(char*));
|
||||
if(!d || !oi) { free(d); free(oi); return -1; }
|
||||
if(cfg->out_ifs && cfg->num_out_ifs) {
|
||||
memmove(oi, cfg->out_ifs, cfg->num_out_ifs*sizeof(char*));
|
||||
free(cfg->out_ifs);
|
||||
}
|
||||
oi[cfg->num_out_ifs] = d;
|
||||
cfg->num_out_ifs++;
|
||||
cfg->out_ifs = oi;
|
||||
} else {
|
||||
/* unknown or unsupported (from the set_option interface):
|
||||
* interface, outgoing-interface, access-control,
|
||||
* stub-zone, name, stub-addr, stub-host, stub-prime
|
||||
|
|
|
|||
Loading…
Reference in a new issue