ipaddress: Only check address origin for delete

We don't need to check the parent interface or anything, just check to
see if the source of the address is static or not. We are only able to
delete static addresses from the configuration currently.

Change-Id: I82bc492c8c39ca2b8703cbde8df7f8fbb5187c6e
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/ipaddress.cpp b/ipaddress.cpp
index f983975..10a22b2 100644
--- a/ipaddress.cpp
+++ b/ipaddress.cpp
@@ -57,23 +57,15 @@
 }
 void IPAddress::delete_()
 {
-    if (parent.dHCPEnabled())
+    if (origin() != IP::AddressOrigin::Static)
     {
-        log<level::ERR>("DHCP enabled on the interface"),
+        log<level::ERR>("Tried to delete a non-static address"),
+            entry("ADDRESS=%s", address().c_str()),
+            entry("PREFIX=%" PRIu8, prefixLength()),
             entry("INTERFACE=%s", parent.interfaceName().c_str());
-        return;
+        elog<InternalFailure>();
     }
 
-#ifdef LINK_LOCAL_AUTOCONFIGURATION
-    if (isLinkLocalIP(address()))
-    {
-        log<level::ERR>("Can not delete the LinkLocal address"),
-            entry("INTERFACE=%s ADDRESS=%s", parent.interfaceName().c_str(),
-                  address().c_str());
-        return;
-    }
-#endif
-
     parent.deleteObject(address());
 }