I am using netlink API rtnl_addr_delete
to delete the ipv4 address configured on interface in Linux. Two IPs belonging to the same subnet are configured to an interface.
When i delete the first configured IP, both IPs are getting deleted which is unexpected. But vice versa is not true, when I delete the second configured IP, the first one does not getting deleted which is expected.
Suppose if 2 IPs belonging to the different subnet, issue is not seen. That is, if i delete first then only first one is deleting.
Any idea weather it is how this rtnl_addr_delete
behaves or any resolutions can be made to fix this issue?