> > I never suggested we should try to design to handle this case; I am merely
 > > refuting the claim that folks should "fix the resolver".  However, it
 > > would seem reasonable to me to have ipadm bail out with an error if it
 > > finds a given hostname maps to more than one IP address.
 > 
 > right.. another thing to remember here is that the debate about
 > generating a default user-friendly label for an address is more of an
 > issue for the CLI than for the library. Backing up a bit, it's only
 > at the CLI that we have issues like "what is a user-friendly way
 > to specify an iptunnel to 'ipadm delete-address' from the command 
 > line?"

Agreed.

 > In the libipadm invocation, one could just call ipadm_create_addr()
 > (or some lookup function to find an address) and get back an opaque
 > structure that would then be used to do other operartions on the
 > address. 

Right.

 > So does the following
 >  ipadm create-addr -i <intf> [-a laddr[,raddr]] <label>
 > offer potential for confusion? 
 > (an address pair will be needed for tunnels. <label> will be
 > used to generate the local address, when no -a arg is supplied)

So the proposal is to use the label to do a hostname lookup and attempt to
derive the address from that?  Doesn't that only further the strange
duality between labels and hostnames?  That is, when the admin first does
a create-addr, the label doubles as a hostname in that it is looked up to
determine an IP address.  However, after that point the label is just
treated as a label, and even if the hostname is changed to refer to a
different IP address, the label (with the same name as the hostname)
continues to refer to the old address -- until a delete-addr is done and
another create-addr is done with the label, in which case it then gets the
latest address.  Or have I misunderstood what you're proposing?

-- 
meem

Reply via email to