we are running WISP setup with ROSv7.5beta4 running on both PPPoE server and PPPoE clients.
if wlan1 goes down, pppoe client also goes down but its ipv4 address stays in /ip address menu as stuck…
so we wrote a script to remove dublicate address to prevent “error: could not add address: already have such address (6)”
:local interfaceName
:set interfaceName [/interface get $interface name]
:if ( [ :len ($"local-address") ] <= 0 ) do=\
{
:log info "PPP removestuckadr: empty local address (down), checking if its stuck"
} else=\
{
:log info "PPP removestuckadr: local address was ($"local-address") (down), checking if its stuck"
}
/ip address
:local stuckadrId
:set stuckadrId [ find interface="$interfaceName" ]
#check if address still exists
:if ( [ :len $stuckadrId ] > 0 ) do=\
{
:log info "PPP removestuckadr: removing stuck IPv4 address of $interfaceName"
remove $stuckadrId
}
/
I hope you can benefit from this script, would be useful if you run WISP setups based on ROSv7.
please add script’s name to PPP profile’s on-down textarea. so it can be auto-run.