diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h index 2011617686..fc7bf73edb 100644 --- a/src/platform/nm-platform.h +++ b/src/platform/nm-platform.h @@ -344,7 +344,7 @@ struct _NMPlatformIP4Address { * addresses that only differ by their peer's network-part. * * Beware that for most cases, NetworkManager doesn't want to set an explicit - * peer-address. Hoever, that corresponds to setting the peer address to @address + * peer-address. However, that corresponds to setting the peer address to @address * itself. Leaving peer-address unset/zero, means explicitly setting the peer * address to 0.0.0.0, which you probably don't want. * */ @@ -377,6 +377,12 @@ typedef union { #undef __NMPlatformIPAddress_COMMON +#define NM_PLATFORM_IP4_ADDRESS_INIT(...) \ + (&((const NMPlatformIP4Address) { __VA_ARGS__ })) + +#define NM_PLATFORM_IP6_ADDRESS_INIT(...) \ + (&((const NMPlatformIP6Address) { __VA_ARGS__ })) + /* Default value for adding an IPv4 route. This is also what iproute2 does. * Note that contrary to IPv6, you can add routes with metric 0 and it is even * the default.