summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/templates/accel-ppp/pppoe.config.tmpl4
-rw-r--r--data/templates/accel-ppp/sstp.config.tmpl3
-rw-r--r--op-mode-definitions/show-protocols-bfd.xml4
3 files changed, 8 insertions, 3 deletions
diff --git a/data/templates/accel-ppp/pppoe.config.tmpl b/data/templates/accel-ppp/pppoe.config.tmpl
index aa9254e61..6c4ff89b1 100644
--- a/data/templates/accel-ppp/pppoe.config.tmpl
+++ b/data/templates/accel-ppp/pppoe.config.tmpl
@@ -88,7 +88,6 @@ wins{{ loop.index }}={{ server }}
{% if auth_mode == 'local' %}
[chap-secrets]
-gw-ip-address={{ ppp_gw }}
chap-secrets={{ chap_secrets_file }}
{% elif auth_mode == 'radius' %}
[radius]
@@ -116,6 +115,9 @@ bind={{ radius_source_address }}
dae-server={{ radius_dynamic_author.server }}:{{ radius_dynamic_author.port }},{{ radius_dynamic_author.key }}
{% endif -%}
{% endif %}
+{% if ppp_gw %}
+gw-ip-address={{ ppp_gw }}
+{% endif %}
{% if sesscrtl != 'disable' %}
[common]
diff --git a/data/templates/accel-ppp/sstp.config.tmpl b/data/templates/accel-ppp/sstp.config.tmpl
index 411fca489..2c8c00023 100644
--- a/data/templates/accel-ppp/sstp.config.tmpl
+++ b/data/templates/accel-ppp/sstp.config.tmpl
@@ -91,6 +91,9 @@ bind={{ radius_source_address }}
dae-server={{ radius_dynamic_author.server }}:{{ radius_dynamic_author.port }},{{ radius_dynamic_author.key }}
{% endif -%}
{% endif %}
+{% if client_gateway %}
+gw-ip-address={{ client_gateway }}
+{% endif %}
[ppp]
verbose=1
diff --git a/op-mode-definitions/show-protocols-bfd.xml b/op-mode-definitions/show-protocols-bfd.xml
index 2cc8a1297..4483b39bf 100644
--- a/op-mode-definitions/show-protocols-bfd.xml
+++ b/op-mode-definitions/show-protocols-bfd.xml
@@ -30,13 +30,13 @@
<script>/usr/bin/vtysh -c "show bfd peers" | awk '/[:blank:]*peer/ { printf "%s\n", $2 }'</script>
</completionHelp>
</properties>
- <command>/usr/bin/vtysh -c "show bfd peers" | awk -v BFD_PEER=$5 '($0 ~ peer BFD_PEER) { system("/usr/bin/vtysh -c \"show bfd " $0 "\"") }'</command>
+ <command>/usr/bin/vtysh -c "show bfd peers" | awk -v BFD_PEER=$5 'BEGIN { regex = sprintf("(peer %s.*)vrf", BFD_PEER) } { if (match($0, regex, bfd_peer_value)) peer=bfd_peer_value[1] } END { if (peer) system("/usr/bin/vtysh -c \"show bfd " peer "\"") }'</command>
<children>
<leafNode name="counters">
<properties>
<help>Show Bidirectional Forwarding Detection (BFD) peer counters</help>
</properties>
- <command>/usr/bin/vtysh -c "show bfd peers" | awk -v BFD_PEER=$5 '($0 ~ peer BFD_PEER) { system("/usr/bin/vtysh -c \"show bfd " $0 " counters\"") }'</command>
+ <command>/usr/bin/vtysh -c "show bfd peers" | awk -v BFD_PEER=$5 'BEGIN { regex = sprintf("(peer %s.*)vrf", BFD_PEER) } { if (match($0, regex, bfd_peer_value)) peer=bfd_peer_value[1] } END { if (peer) system("/usr/bin/vtysh -c \"show bfd " peer " counters\"") }'</command>
</leafNode>
</children>
</tagNode>