Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Provide ability to set forward-*-upstream from remote #916

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions daemon/remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -2095,6 +2095,7 @@ parse_fs_args(RES* ssl, char* args, uint8_t** nm, struct delegpt** dp,
char* rest;
size_t nmlen;
int nmlabs;
uint8_t ssl_upstream = 0, tcp_upstream = 0;
/* parse all -x args */
while(args[0] == '+') {
if(!find_arg2(ssl, args, &rest))
Expand All @@ -2104,6 +2105,10 @@ parse_fs_args(RES* ssl, char* args, uint8_t** nm, struct delegpt** dp,
*insecure = 1;
else if(*args == 'p' && prime)
*prime = 1;
else if(*args == 't')
tcp_upstream = 1;
else if(*args == 's')
ssl_upstream = 1;
else {
(void)ssl_printf(ssl, "error: unknown option %s\n", args);
return 0;
Expand All @@ -2127,6 +2132,8 @@ parse_fs_args(RES* ssl, char* args, uint8_t** nm, struct delegpt** dp,
free(*nm);
return 0;
}
(*dp)->tcp_upstream = tcp_upstream;
(*dp)->ssl_upstream = ssl_upstream;
}
return 1;
}
Expand Down
4 changes: 3 additions & 1 deletion doc/unbound-control.8.in
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,12 @@ still be bogus, use \fBflush_zone\fR to remove it), does not affect the config f
.B insecure_remove \fIzone
Removes domain\-insecure for the given zone.
.TP
.B forward_add \fR[\fI+i\fR] \fIzone addr ...
.B forward_add \fR[\fI+ist\fR] \fIzone addr ...
Add a new forward zone to running Unbound. With +i option also adds a
\fIdomain\-insecure\fR for the zone (so it can resolve insecurely if you have
a DNSSEC root trust anchor configured for other names).
With +s option it will use \fIforward-tls-upstream yes\fR for this forwarder.
With +t option it will use \fIforward-tcp-upstream yes\fR for this forwarder.
The addr can be IP4, IP6 or nameserver names, like \fIforward-zone\fR config
in unbound.conf.
.TP
Expand Down