From 9703bda9c3e6d7172851ba4420679364fb3e62f0 Mon Sep 17 00:00:00 2001
From: Christian Poessinger <christian@poessinger.com>
Date: Thu, 28 Dec 2017 00:39:54 +0100
Subject: T297: Fix DNS Forwarding server does not allow IPv6 address in
 name-server

---
 templates/service/dns/forwarding/name-server/node.def | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'templates/service/dns/forwarding/name-server/node.def')

diff --git a/templates/service/dns/forwarding/name-server/node.def b/templates/service/dns/forwarding/name-server/node.def
index 3ed4c459..ac7e45b6 100644
--- a/templates/service/dns/forwarding/name-server/node.def
+++ b/templates/service/dns/forwarding/name-server/node.def
@@ -1,3 +1,5 @@
 multi:
-type: ipv4
-help: DNS server to forward queries
+type: ipv4,ipv6
+help: Domain Name Server (DNS)
+val_help: ipv4; Domain Name Server (DNS) address
+val_help: ipv6; Domain Name Server (DNS) address
-- 
cgit v1.2.3


From df78ae1e4411c15f27f5f29b172b71504c444637 Mon Sep 17 00:00:00 2001
From: Christian Poessinger <christian@poessinger.com>
Date: Fri, 16 Mar 2018 20:09:27 +0100
Subject: Remove dns forwarding templates in favor of vyos-1x

---
 templates/service/dns/forwarding/cache-size/node.def           |  5 -----
 templates/service/dns/forwarding/dhcp/node.def                 |  8 --------
 templates/service/dns/forwarding/domain/node.def               |  4 ----
 .../service/dns/forwarding/domain/node.tag/server/node.def     |  5 -----
 templates/service/dns/forwarding/ignore-hosts-file/node.def    |  1 -
 templates/service/dns/forwarding/listen-on/node.def            |  5 -----
 templates/service/dns/forwarding/name-server/node.def          |  5 -----
 templates/service/dns/forwarding/node.def                      | 10 ----------
 templates/service/dns/forwarding/query-all-servers/node.def    |  1 -
 templates/service/dns/forwarding/system/node.def               |  2 --
 10 files changed, 46 deletions(-)
 delete mode 100644 templates/service/dns/forwarding/cache-size/node.def
 delete mode 100644 templates/service/dns/forwarding/dhcp/node.def
 delete mode 100644 templates/service/dns/forwarding/domain/node.def
 delete mode 100644 templates/service/dns/forwarding/domain/node.tag/server/node.def
 delete mode 100644 templates/service/dns/forwarding/ignore-hosts-file/node.def
 delete mode 100644 templates/service/dns/forwarding/listen-on/node.def
 delete mode 100644 templates/service/dns/forwarding/name-server/node.def
 delete mode 100644 templates/service/dns/forwarding/node.def
 delete mode 100644 templates/service/dns/forwarding/query-all-servers/node.def
 delete mode 100644 templates/service/dns/forwarding/system/node.def

(limited to 'templates/service/dns/forwarding/name-server/node.def')

diff --git a/templates/service/dns/forwarding/cache-size/node.def b/templates/service/dns/forwarding/cache-size/node.def
deleted file mode 100644
index 9285dbbd..00000000
--- a/templates/service/dns/forwarding/cache-size/node.def
+++ /dev/null
@@ -1,5 +0,0 @@
-type: u32
-default:150
-help: DNS forwarding cache size
-syntax:expression: ($VAR(@) >=0 && $VAR(@) < 10001) ; "Cache size must be between 0 and 10000"
-val_help: u32:0-10000; DNS forwarding cache size
diff --git a/templates/service/dns/forwarding/dhcp/node.def b/templates/service/dns/forwarding/dhcp/node.def
deleted file mode 100644
index f19b000e..00000000
--- a/templates/service/dns/forwarding/dhcp/node.def
+++ /dev/null
@@ -1,8 +0,0 @@
-multi:
-type: txt
-help: Use nameservers received from DHCP server for specified interface
-commit:expression: exec "/opt/vyatta/sbin/vyatta-dns-forwarding.pl --dhcp-interface $VAR(@)"
-allowed:
-         local -a array ;
-         array=( /var/lib/dhcp/eth* /var/lib/dhcp/br* ) ;
-         echo  -n ${array[@]##*/}
diff --git a/templates/service/dns/forwarding/domain/node.def b/templates/service/dns/forwarding/domain/node.def
deleted file mode 100644
index bdd82752..00000000
--- a/templates/service/dns/forwarding/domain/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-tag:
-type: txt 
-help: DNS domain to forward to a local server 
-commit:expression: $VAR(./server/) != ""; "Error: No server configured for the domain $VAR(@)"
diff --git a/templates/service/dns/forwarding/domain/node.tag/server/node.def b/templates/service/dns/forwarding/domain/node.tag/server/node.def
deleted file mode 100644
index e616c0aa..00000000
--- a/templates/service/dns/forwarding/domain/node.tag/server/node.def
+++ /dev/null
@@ -1,5 +0,0 @@
-multi:
-type: ipv4,ipv6
-help: Domain Name Server (DNS) to forward queries
-val_help: ipv4; Domain Name Server (DNS) address
-val_help: ipv6; Domain Name Server (DNS) address
diff --git a/templates/service/dns/forwarding/ignore-hosts-file/node.def b/templates/service/dns/forwarding/ignore-hosts-file/node.def
deleted file mode 100644
index 08a89ca8..00000000
--- a/templates/service/dns/forwarding/ignore-hosts-file/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Do not use local /etc/hosts file in name resolution
diff --git a/templates/service/dns/forwarding/listen-on/node.def b/templates/service/dns/forwarding/listen-on/node.def
deleted file mode 100644
index 3d1c748f..00000000
--- a/templates/service/dns/forwarding/listen-on/node.def
+++ /dev/null
@@ -1,5 +0,0 @@
-multi:
-type: txt
-help: Interface to listen for DNS queries [REQUIRED]
-allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=all
-commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --warn"
diff --git a/templates/service/dns/forwarding/name-server/node.def b/templates/service/dns/forwarding/name-server/node.def
deleted file mode 100644
index ac7e45b6..00000000
--- a/templates/service/dns/forwarding/name-server/node.def
+++ /dev/null
@@ -1,5 +0,0 @@
-multi:
-type: ipv4,ipv6
-help: Domain Name Server (DNS)
-val_help: ipv4; Domain Name Server (DNS) address
-val_help: ipv6; Domain Name Server (DNS) address
diff --git a/templates/service/dns/forwarding/node.def b/templates/service/dns/forwarding/node.def
deleted file mode 100644
index ae7a9d3c..00000000
--- a/templates/service/dns/forwarding/node.def
+++ /dev/null
@@ -1,10 +0,0 @@
-priority: 918
-help: DNS forwarding
-commit:expression: $VAR(./listen-on) != ""; "At least one interface must be configured for DNS forwarding parameter 'listen-on'"
-delete:expression: "touch /tmp/dnsmasq.$PPID"
-end:expression: "if [ -f \"/tmp/dnsmasq.$PPID\" ]; then \
-        sudo /opt/vyatta/sbin/vyatta-dns-forwarding.pl --stop-dnsforwarding \
-        rm /tmp/dnsmasq.$PPID; \
-      else \
-        sudo /opt/vyatta/sbin/vyatta-dns-forwarding.pl --update-dnsforwarding; \
-      fi; "
diff --git a/templates/service/dns/forwarding/query-all-servers/node.def b/templates/service/dns/forwarding/query-all-servers/node.def
deleted file mode 100644
index 90e8e7ec..00000000
--- a/templates/service/dns/forwarding/query-all-servers/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Query all DNS servers, respond and cache fastest result
diff --git a/templates/service/dns/forwarding/system/node.def b/templates/service/dns/forwarding/system/node.def
deleted file mode 100644
index a37676de..00000000
--- a/templates/service/dns/forwarding/system/node.def
+++ /dev/null
@@ -1,2 +0,0 @@
-help: DNS forwarding to system nameservers
-commit:expression: exec "/opt/vyatta/sbin/vyatta-dns-forwarding.pl --system-nameserver"
-- 
cgit v1.2.3

