I'm trying to improve Zerotier support and faced some issues while working on netifd protocol handler.
Looks like the correct procedure to notify the system about interface status, including current IP address is following:
The problem I see here is that proto_add_ipv4_address function re-assigns IP address to the interface when interface status data reaches netifd.
Since Zerotier already assigns IP address to the interface, I'm rather looking for a way to update interface status with all the info (addresses, routes etc.) which is already assigned to the interface without extracting it with ip command and assigning again.
Conceptually, netifd must be the owner and authoritative source of layer 4 address settings. Protocols that configure IP addresses without involving netifd are not compliant and will lead to undefined behavior such as missing/stale status data, netifd clearing/reverting IP settings on config reload etc.
If the supervised protocol process does not support exposing effective address info without simultaneously configuring it then yes, the only way is extracting the settings and reapplying them through netifd.