interfaces: in SLAAC tracking prevent footshooting

This commit is contained in:
Franco Fichtner 2024-05-30 14:48:38 +02:00
parent c1424c6425
commit 572ae8a665
2 changed files with 9 additions and 0 deletions

View File

@ -2868,6 +2868,10 @@ if [ -z "\${1}" ]; then
echo "Nothing to do."
exit 0
fi
if grep -q "^interface \${1} " /var/etc/radvd.conf; then
echo "Rejecting own configuration."
exit 0
fi
if [ -n "\${2}" ]; then
# Note that the router file can be written by ppp-linkup.sh or
# this script so do not clear the file as it may already exist.

View File

@ -40,6 +40,11 @@ ifname=${2%%:[*}
rasrca=${2##*:[}
rasrca=${rasrca%]}
if grep -q "^interface ${ifname%%:slaac} " /var/etc/radvd.conf; then
echo "Rejecting own configuration."
exit 0
fi
# ${1} indicates whether DNS information should be added or deleted.
if [ "${1}" = "-a" ]; then