summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorSteve Teuber <steveteuber@users.noreply.github.com>2017-05-17 07:53:12 +0200
committerScott Dodson <sdodson@redhat.com>2017-06-30 16:22:53 -0400
commite20748de5b679c8a5747dd94b6603a97a64450ae (patch)
tree57eab7ee81419de7befd8695ff29409c55e72a75 /roles
parentd9c30f08cebe462a62e9c5131b6e3cec6b01e80a (diff)
downloadopenshift-e20748de5b679c8a5747dd94b6603a97a64450ae.tar.gz
openshift-e20748de5b679c8a5747dd94b6603a97a64450ae.tar.bz2
openshift-e20748de5b679c8a5747dd94b6603a97a64450ae.tar.xz
openshift-e20748de5b679c8a5747dd94b6603a97a64450ae.zip
Prevent the script to use default route ip as upstream nameserver.
Diffstat (limited to 'roles')
-rwxr-xr-xroles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh b/roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh
index 2c466e4f0..924226d09 100755
--- a/roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh
+++ b/roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh
@@ -45,7 +45,8 @@ if [[ $2 =~ ^(up|dhcp4-change|dhcp6-change)$ ]]; then
def_route_int=$(/sbin/ip route get to ${def_route} | awk '{print $3}')
def_route_ip=$(/sbin/ip route get to ${def_route} | awk '{print $5}')
if [[ ${DEVICE_IFACE} == ${def_route_int} && \
- -n "${IP4_NAMESERVERS}" ]]; then
+ -n "${IP4_NAMESERVERS}" && \
+ "${IP4_NAMESERVERS}" != "${def_route_ip}" ]]; then
if [ ! -f /etc/dnsmasq.d/origin-dns.conf ]; then
cat << EOF > /etc/dnsmasq.d/origin-dns.conf
no-resolv