From 927c98f23a6317e2e3565032023d68b753d71037 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 10 Apr 2020 13:28:46 +0200 Subject: pppoe: T2248: connect-on-demand and vrf are mutually exclusive As PPP can be used to establish a connection on-demand it manages the Kernel default route. This can not be used when using VRFs which are managed by the ip-up.d and ip-down.d scripts - thus those options are now mutially exclusive. The best fix would be adding support for VRFs into PPP. --- data/templates/pppoe/peer.tmpl | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'data/templates/pppoe/peer.tmpl') diff --git a/data/templates/pppoe/peer.tmpl b/data/templates/pppoe/peer.tmpl index 8651f12a5..36d108cee 100644 --- a/data/templates/pppoe/peer.tmpl +++ b/data/templates/pppoe/peer.tmpl @@ -60,4 +60,13 @@ rp_pppoe_service "{{ service_name }}" {% endif %} {% if on_demand %} demand +# See T2249. PPP default route options should only be set when in on-demand +# mode. As soon as we are not in on-demand mode the default-route handling is +# passed to the ip-up.d/ip-down.s scripts which is required for VRF support. +{% if 'auto' in default_route -%} +defaultroute +{% elif 'force' in default_route -%} +defaultroute +replacedefaultroute +{% endif %} {% endif %} -- cgit v1.2.3