summaryrefslogtreecommitdiff
path: root/data/templates/accel-ppp/ppp-options.j2
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2024-02-02 10:14:35 +0200
committerGitHub <noreply@github.com>2024-02-02 10:14:35 +0200
commitf2de4378b5048fb4fc3a493aa2a214a320dd8d48 (patch)
treec4c389afdc2c14a515bffadfdecf3b691625b928 /data/templates/accel-ppp/ppp-options.j2
parent0307801b8928bbaaa20caf5bd10b928bae459490 (diff)
parentd9e57fe65dd538c6ea80637f4f6f23cf11dc583d (diff)
downloadvyos-1x-f2de4378b5048fb4fc3a493aa2a214a320dd8d48.tar.gz
vyos-1x-f2de4378b5048fb4fc3a493aa2a214a320dd8d48.zip
Merge pull request #2891 from aapostoliuk/T5971-circinus
T5971: Rewritten ppp options in accel-ppp services
Diffstat (limited to 'data/templates/accel-ppp/ppp-options.j2')
-rw-r--r--data/templates/accel-ppp/ppp-options.j239
1 files changed, 39 insertions, 0 deletions
diff --git a/data/templates/accel-ppp/ppp-options.j2 b/data/templates/accel-ppp/ppp-options.j2
new file mode 100644
index 000000000..f2d2519d9
--- /dev/null
+++ b/data/templates/accel-ppp/ppp-options.j2
@@ -0,0 +1,39 @@
+#ppp options
+[ppp]
+verbose=1
+check-ip=1
+ccp={{ "0" if ppp_options.disable_ccp is vyos_defined else "1" }}
+unit-preallocate={{ "1" if authentication.radius.preallocate_vif is vyos_defined else "0" }}
+{% if ppp_options.min_mtu is vyos_defined %}
+min-mtu={{ ppp_options.min_mtu }}
+{% endif %}
+{% if ppp_options.mru is vyos_defined %}
+mru={{ ppp_options.mru }}
+{% endif %}
+mppe={{ ppp_options.mppe }}
+lcp-echo-interval={{ ppp_options.lcp_echo_interval }}
+lcp-echo-timeout={{ ppp_options.lcp_echo_timeout }}
+lcp-echo-failure={{ ppp_options.lcp_echo_failure }}
+{% if ppp_options.ipv4 is vyos_defined %}
+ipv4={{ ppp_options.ipv4 }}
+{% endif %}
+{# IPv6 #}
+{% if ppp_options.ipv6 is vyos_defined %}
+ipv6={{ ppp_options.ipv6 }}
+{% if ppp_options.ipv6_interface_id is vyos_defined %}
+ipv6-intf-id={{ ppp_options.ipv6_interface_id }}
+{% endif %}
+{% if ppp_options.ipv6_peer_interface_id is vyos_defined %}
+{% if ppp_options.ipv6_peer_interface_id == 'ipv4-addr' %}
+ipv6-peer-intf-id=ipv4
+{% else %}
+ipv6-peer-intf-id={{ ppp_options.ipv6_peer_interface_id }}
+{% endif %}
+{% endif %}
+ipv6-accept-peer-intf-id={{ "1" if ppp_options.ipv6_accept_peer_interface_id is vyos_defined else "0" }}
+{% endif %}
+{# MTU #}
+mtu={{ mtu }}
+{% if ppp_options.interface_cache is vyos_defined %}
+unit-cache={{ ppp_options.interface_cache }}
+{% endif %}