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

Conditional forwarding: Also forward unqualified host names #4287

Merged
merged 2 commits into from Aug 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions advanced/Scripts/webpage.sh
Expand Up @@ -54,7 +54,7 @@ add_setting() {
}

delete_setting() {
sed -i "/${1}/d" "${setupVars}"
sed -i "/^${1}/d" "${setupVars}"
}

change_setting() {
Expand All @@ -67,7 +67,7 @@ addFTLsetting() {
}

deleteFTLsetting() {
sed -i "/${1}/d" "${FTLconf}"
sed -i "/^${1}/d" "${FTLconf}"
}

changeFTLsetting() {
Expand All @@ -84,7 +84,7 @@ add_dnsmasq_setting() {
}

delete_dnsmasq_setting() {
sed -i "/${1}/d" "${dnsmasqconfig}"
sed -i "/^${1}/d" "${dnsmasqconfig}"
}

SetTemperatureUnit() {
Expand Down Expand Up @@ -267,9 +267,14 @@ trust-anchor=.,20326,8,2,E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC68345710423
delete_setting "CONDITIONAL_FORWARDING_IP"
fi

delete_dnsmasq_setting "rev-server"

if [[ "${REV_SERVER}" == true ]]; then
add_dnsmasq_setting "rev-server=${REV_SERVER_CIDR},${REV_SERVER_TARGET}"
# Forward unqualified names to the CF target
add_dnsmasq_setting "server=//${REV_SERVER_TARGET}"
if [ -n "${REV_SERVER_DOMAIN}" ]; then
# Forward local domain names to the CF target, too
add_dnsmasq_setting "server=/${REV_SERVER_DOMAIN}/${REV_SERVER_TARGET}"
fi
fi
Expand Down