Move InterfaceList back to set
There are duplicated entries in InterfaceList and causing dbus object
creation failures for
- /xyz/openbmc_project/network/config
- /xyz/openbmc_project/network/config/dhcp
Example Failure,
```
$ /tmp/phosphor-network-manager &
[1] 23394
$ busctl tree xyz.openbmc_project.Network
`-/xyz
`-/xyz/openbmc_project
`-/xyz/openbmc_project/network
$ sdeventplus: timeCallback: sd_bus_add_object_vtable: org.freedesktop.DBus.Error.FileExists: File exists
busctl tree xyz.openbmc_project.Network
`-/xyz
`-/xyz/openbmc_project
`-/xyz/openbmc_project/network
|-/xyz/openbmc_project/network/dummy0
| |-/xyz/openbmc_project/network/dummy0/ipv4
...
```
Tested:
The object is created with no error now.
Signed-off-by: Willy Tu <wltu@google.com>
Change-Id: Iaf91ceee118a4bd32ec8277e0c1372ccab1cb9d9
diff --git a/src/types.hpp b/src/types.hpp
index e14cac4..c64407a 100644
--- a/src/types.hpp
+++ b/src/types.hpp
@@ -9,6 +9,7 @@
#include <sdeventplus/clock.hpp>
#include <sdeventplus/utility/timer.hpp>
#include <string>
+#include <unordered_set>
#include <variant>
namespace phosphor
@@ -52,7 +53,7 @@
// Byte representations for common address types in network byte order
using InAddrAny = std::variant<struct in_addr, struct in6_addr>;
-using InterfaceList = std::vector<IntfName>;
+using InterfaceList = std::unordered_set<IntfName>;
using Timer = sdeventplus::utility::Timer<sdeventplus::ClockId::Monotonic>;