Page MenuHomeVyOS Platform

No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None
diff --git a/data/templates/pppoe/ip-down.script.tmpl b/data/templates/pppoe/ip-down.script.tmpl
index 5e119f796..bac4155d6 100644
--- a/data/templates/pppoe/ip-down.script.tmpl
+++ b/data/templates/pppoe/ip-down.script.tmpl
@@ -1,36 +1,38 @@
#!/bin/sh
# As PPPoE is an "on demand" interface we need to re-configure it when it
# becomes up
if [ "$6" != "{{ ifname }}" ]; then
exit
fi
# add some info to syslog
DIALER_PID=$(cat /var/run/{{ ifname }}.pid)
logger -t pppd[$DIALER_PID] "executing $0"
{% if connect_on_demand is not defined %}
# See https://phabricator.vyos.net/T2248. Determine if we are enslaved to a
# VRF, this is needed to properly insert the default route.
VRF_NAME=""
if [ -d /sys/class/net/{{ ifname }}/upper_* ]; then
# Determine upper (VRF) interface
VRF=$(basename $(ls -d /sys/class/net/{{ ifname }}/upper_*))
# Remove upper_ prefix from result string
VRF=${VRF#"upper_"}
# Populate variable to run in VR context
VRF_NAME="vrf ${VRF_NAME}"
fi
-# Always delete default route when interface goes down
+{% if default_route != 'none' %}
+# Always delete default route when interface goes down if we installed it
vtysh -c "conf t" ${VRF_NAME} -c "no ip route 0.0.0.0/0 {{ ifname }} ${VRF_NAME}"
-{% if ipv6 is defined and ipv6.address is defined and ipv6.address.autoconf is defined %}
+{% if ipv6 is defined and ipv6.address is defined and ipv6.address.autoconf is defined %}
vtysh -c "conf t" ${VRF_NAME} -c "no ipv6 route ::/0 {{ ifname }} ${VRF_NAME}"
+{% endif %}
{% endif %}
{% endif %}
{% if dhcpv6_options is defined and dhcpv6_options.pd is defined %}
# Stop wide dhcpv6 client
systemctl stop dhcp6c@{{ ifname }}.service
{% endif %}

File Metadata

Mime Type
text/x-diff
Expires
Thu, Nov 26, 10:12 PM (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4989141
Default Alt Text
(1 KB)

Event Timeline