summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/vyos/ifconfig.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py
index 52eab5717..e5f50130f 100644
--- a/python/vyos/ifconfig.py
+++ b/python/vyos/ifconfig.py
@@ -826,6 +826,9 @@ class LoopbackIf(Interface):
"""
# remove all assigned IP addresses from interface
for addr in self.get_addr():
+ if addr in ["127.0.0.1/8", "::1/128"]:
+ # Do not allow deletion of the default loopback addresses
+ continue
self.del_addr(addr)
# question: do we also delerte the loopback address? 127.0.0.1/8