ethernet: Add origin to generateId()
Currently the code uses the ip address, prefix, and gateway to generate
the ID of the DBus object.
This results in the same DBus object path for the same IPs while they
have different address origin.
E.g. if we have the DHCP address and assign the same static address, the
DBus object paths are the same and it gets
`org.freedesktop.DBus.Error.FileExists` exception while creating the new
object.
Add origin to generateId() so they generate the two different object
paths and the above issue could be fixed.
Tested: Verify in QEMU that setting static IP is OK from DHCP.
Fixes openbmc/phosphor-networkd#41
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Iafe94cedff7e39490386be7777f3d975f1cf6b3f
3 files changed