summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-06-18 12:34:02 +0200
committerLennart Poettering <lennart@poettering.net>2014-06-18 18:28:29 +0200
commit5d3de3fe9cc452f1bfe3c2dcafecbd7f904da4dc (patch)
tree624cc09d6594add462d1323b9c95f16252c4b9ce /src/network
parent03966da2ca04ca96dd0a1852d7fa423aaf18eba6 (diff)
socket-util: introduce in_addr_union similar to sockaddr_union and make use of it everywhere
Diffstat (limited to 'src/network')
-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);
};