On (04/24/09 17:46), Erik Nordmark wrote:
>> no I am concerned that when someone call ipadm_create_addr() the library
>> has to figure out if the interface has to be created, and if it doesnt,
>> if it should do SLIFADDR or ADDIF. These decisions cannot be done
>> atomically from the library.
>
> Why would the library have to be concerned about them not being atomic  
> *unless* there are dualing admins?

If "duelling admins" is a problem we don't want to solve, then yes,
we can simply do 
  if (ipadm_create_interface() == IPADM_EXISTS) {
        /* ADDIF */
  } else {
        /* SLIFADDR */
  }

but it does leave a hole if two apps are trying to create_addr  on the 
same object (which does not currently exist)

--Sowmini

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to