mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-5533: Disable VR's DNS functionality if user choose to use external dns
Also fix the regression that external dns won't be used if "dns" service in the network offering is unset.
This commit is contained in:
parent
c7e2914bcd
commit
e54d1dec9d
@ -2137,7 +2137,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
|
|||||||
|
|
||||||
boolean useExtDns = !dnsProvided;
|
boolean useExtDns = !dnsProvided;
|
||||||
/* For backward compatibility */
|
/* For backward compatibility */
|
||||||
useExtDns = UseExternalDnsServers.valueIn(dc.getId());
|
useExtDns = useExtDns || UseExternalDnsServers.valueIn(dc.getId());
|
||||||
|
|
||||||
if (useExtDns) {
|
if (useExtDns) {
|
||||||
buf.append(" useextdns=true");
|
buf.append(" useextdns=true");
|
||||||
|
|||||||
@ -715,6 +715,12 @@ setup_dnsmasq() {
|
|||||||
then
|
then
|
||||||
[ $ETH0_IP ] && NS="$INTERNAL_DNS,$NS"
|
[ $ETH0_IP ] && NS="$INTERNAL_DNS,$NS"
|
||||||
[ $ETH0_IP6 ] && NS6="[::],$NS6"
|
[ $ETH0_IP6 ] && NS6="[::],$NS6"
|
||||||
|
# enable dns
|
||||||
|
sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf
|
||||||
|
else
|
||||||
|
# disable dns
|
||||||
|
sed -i -e "/^[#]*port=.*$/d" /etc/dnsmasq.conf
|
||||||
|
echo "port=0" >> /etc/dnsmasq.conf
|
||||||
fi
|
fi
|
||||||
NS=${NS%?}
|
NS=${NS%?}
|
||||||
NS6=${NS6%?}
|
NS6=${NS6%?}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user