interfaces: do not flush nameserver routes we do not add

Cleanup would be better but ifctl is not the place for it (no symmetry).

Maybe in the future we can use output from

    # pluginctl -r host_routes

to remove the routes safelty as they don't show if not used.

PR: https://forum.opnsense.org/index.php?topic=33831.0
This commit is contained in:
Franco Fichtner 2023-05-22 08:29:10 +02:00
parent 92d14dd4cd
commit c12e77519f

View File

@ -39,14 +39,6 @@ flush_routes()
fi
case ${MD} in
nameserver)
# flush host routes here to make sure they are recycled
# properly although maybe later we need to avoid this
# to not cause an inconsistent routing table state.
for CONTENT in $(cat ${FILE}); do
route delete -${AF} "${CONTENT}"
done
;;
prefix)
# flush null route to delegated prefix
for CONTENT in $(cat ${FILE}); do