[email protected] wrote:
Thus if I do
    ipadm create-addr -i bge0 myhost.com
and later do
    ipadm delete-addr -i bge0 myhost.com
then I want to delete the addresses I added, and not what getaddrinfo returned at the time of the delete.

but either way, there is some risk of inconsistency.. if the create-addr
was done 4 months ago, when myhost.com mapped to 10.1.2.3, and today myhost.com maps to 10.1.2.35, then how should the user know
what will get deleted by "delete-addr"? (or is that a bogus example?)

What will be deleted is the address object which has the name "bge0/myhost.com", whatever addresses are in there.

To avoid surprises it probably means that we should print myhost.com as the <label> for such address objects.

If we know that the set of configured addresses for myhost.com will
always be a subset of the set of resolved addresses for myhost.com
at any point in time, then we could make sure we operate on the correct
subset.

But you don't know that.

In any case, I think we should focus on getting the simpler case
(numeric addresses only) to work correctly first, and add static
address labels (via getaddrinfo or otherwise) as an enhancement
later, just making sure that the CLI/API will allow for these extensions.

Agreed. And later could be never.

   Erik
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to