summaryrefslogtreecommitdiff
path: root/src/network/networkd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/networkd.h')
-rw-r--r--src/network/networkd.h17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/network/networkd.h b/src/network/networkd.h
index 3b081d5276..308be832e1 100644
--- a/src/network/networkd.h
+++ b/src/network/networkd.h
@@ -36,6 +36,7 @@
#include "list.h"
#include "set.h"
#include "condition-util.h"
+#include "socket-util.h"
#define CACHE_INFO_INFINITY_LIFE_TIME 0xFFFFFFFFU
#define VXLAN_VID_MAX (1u << 24) - 1
@@ -184,10 +185,7 @@ struct Address {
struct in_addr broadcast;
struct ifa_cacheinfo cinfo;
- union {
- struct in_addr in;
- struct in6_addr in6;
- } in_addr;
+ union in_addr_union in_addr;
LIST_FIELDS(Address, addresses);
};
@@ -201,15 +199,8 @@ struct Route {
unsigned char scope;
uint32_t metrics;
- union {
- struct in_addr in;
- struct in6_addr in6;
- } in_addr;
-
- union {
- struct in_addr in;
- struct in6_addr in6;
- } dst_addr;
+ union in_addr_union in_addr;
+ union in_addr_union dst_addr;
LIST_FIELDS(Route, routes);
};