Hi!
I have trouble with PPP-Down script.
I want to use PPP-UP and PPP-Down scripts for add route to additional routing table.
In PPP-DOWN I remove only one route, but I see bug in route list. In log – route removed, but I see it in route list. If I try to delete ghost route - OSPF instance go to restart.
Software 6.41; 6.40.5; 6.40.1
PPP-UP script:
:local localAddr $“local-address”
:local remoteAddr $“remote-address”
:local interfaceName [/interface get $interface name]
:log warning “$user connected: was given $remoteAddr IP (GW $localAddr) and assigned to $interfaceName interface”; /ip route add dst-address=$remoteAddr routing-mark=OSPF pref-src=$localAddr gateway=$interfaceName
>
PPP-Down script:
> ```text
:local localAddr $"local-address"; \
:local remoteAddr $"remote-address"; \
:local interfaceName [/interface get $interface name]; \
:local remoteAddrMask "$remoteAddr/32"; \
:log warning "$user Disconnected: IP $remoteAddrMask (GW $localAddr) interface $interfaceName ($"interface")"; /ip route remove [find dst-address=$remoteAddrMask ];
Video https://youtu.be/2vreFioVmIg
How to repeat:
Remove def.conf
On Mik2 router create SSTP-CERT certificate
Use cfg from attachement
Wire scheme Mik1(eth1) ↔ (eth1)Mik2(eth2) ↔ (eth1)Mik3

After connect Mik3 by SSTP – on Mik2 kill sstp connection 2 or more times.
On Mik2, after disconnects, in terminal you can see:
01:36:07 echo: sstp,ppp,info : terminating…
01:36:07 echo: sstp,ppp,info,account test logged out, 832 9273 9302 123 124
01:36:07 echo: sstp,ppp,info : disconnected
01:36:07 echo: route,ospf,info OSPFv2 neighbor 10.0.0.1: state change from Full to Down
01:36:07 echo: system,info route removed
01:36:07 echo: sstp,ppp,info,account test logged in, 10.50.0.20
01:36:07 echo: sstp,ppp,info : authenticated
01:36:07 echo: sstp,ppp,info : connected
01:36:07 echo: system,info route added
Ghost route in this screenshot:

After try to delete this – nothing changed.
Close window with route list and open again – all OSPF routes deleted, this additional route deleted too.

After few second – OSPF routes come back.
Some times I have more stranges in route list

Mik1.rsc (445 Bytes)
Mik2.rsc (2.05 KB)
Mik3.rsc (592 Bytes)