platform: adjust type of IPv6 address flags to guint
Address flags inside 'struct ifaddrmsg' are uint8_t and they are extended to uint32_t via IFA_FLAGS. Change it to be guint32.
This commit is contained in:
@@ -1147,7 +1147,7 @@ nmtst_platform_ip6_address (const char *address, const char *peer_address, guint
|
|||||||
inline static NMPlatformIP6Address *
|
inline static NMPlatformIP6Address *
|
||||||
nmtst_platform_ip6_address_full (const char *address, const char *peer_address, guint plen,
|
nmtst_platform_ip6_address_full (const char *address, const char *peer_address, guint plen,
|
||||||
int ifindex, NMIPConfigSource source, guint32 timestamp,
|
int ifindex, NMIPConfigSource source, guint32 timestamp,
|
||||||
guint32 lifetime, guint32 preferred, guint flags)
|
guint32 lifetime, guint32 preferred, guint32 flags)
|
||||||
{
|
{
|
||||||
NMPlatformIP6Address *addr = nmtst_platform_ip6_address (address, peer_address, plen);
|
NMPlatformIP6Address *addr = nmtst_platform_ip6_address (address, peer_address, plen);
|
||||||
|
|
||||||
|
@@ -5627,7 +5627,7 @@ rdisc_config_changed (NMRDisc *rdisc, NMRDiscConfigMap changed, NMDevice *self)
|
|||||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
|
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
|
||||||
int i;
|
int i;
|
||||||
int system_support;
|
int system_support;
|
||||||
guint ifa_flags = 0x00;
|
guint32 ifa_flags = 0x00;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check, whether kernel is recent enough to help user space handling RA.
|
* Check, whether kernel is recent enough to help user space handling RA.
|
||||||
|
@@ -134,7 +134,7 @@ rdisc_config_changed (NMRDisc *rdisc, NMRDiscConfigMap changed, gpointer user_da
|
|||||||
NMIP6Config *existing;
|
NMIP6Config *existing;
|
||||||
NMIP6Config *ip6_config;
|
NMIP6Config *ip6_config;
|
||||||
static int system_support = -1;
|
static int system_support = -1;
|
||||||
guint ifa_flags = 0x00;
|
guint32 ifa_flags = 0x00;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (system_support == -1) {
|
if (system_support == -1) {
|
||||||
|
@@ -937,7 +937,8 @@ ip6_address_add (NMPlatform *platform,
|
|||||||
int plen,
|
int plen,
|
||||||
struct in6_addr peer_addr,
|
struct in6_addr peer_addr,
|
||||||
guint32 lifetime,
|
guint32 lifetime,
|
||||||
guint32 preferred, guint flags)
|
guint32 preferred,
|
||||||
|
guint32 flags)
|
||||||
{
|
{
|
||||||
NMFakePlatformPrivate *priv = NM_FAKE_PLATFORM_GET_PRIVATE (platform);
|
NMFakePlatformPrivate *priv = NM_FAKE_PLATFORM_GET_PRIVATE (platform);
|
||||||
NMPlatformIP6Address address;
|
NMPlatformIP6Address address;
|
||||||
|
@@ -1676,8 +1676,8 @@ _new_from_nl_addr (struct nlmsghdr *nlh, gboolean id_only)
|
|||||||
|
|
||||||
if (!is_v4) {
|
if (!is_v4) {
|
||||||
obj->ip6_address.flags = tb[IFA_FLAGS]
|
obj->ip6_address.flags = tb[IFA_FLAGS]
|
||||||
? nla_get_u32 (tb[IFA_FLAGS])
|
? nla_get_u32 (tb[IFA_FLAGS])
|
||||||
: ifa->ifa_flags;
|
: ifa->ifa_flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_v4) {
|
if (is_v4) {
|
||||||
@@ -5214,7 +5214,7 @@ ip6_address_add (NMPlatform *platform,
|
|||||||
struct in6_addr peer_addr,
|
struct in6_addr peer_addr,
|
||||||
guint32 lifetime,
|
guint32 lifetime,
|
||||||
guint32 preferred,
|
guint32 preferred,
|
||||||
guint flags)
|
guint32 flags)
|
||||||
{
|
{
|
||||||
NMPObject obj_id;
|
NMPObject obj_id;
|
||||||
nm_auto_nlmsg struct nl_msg *nlmsg = NULL;
|
nm_auto_nlmsg struct nl_msg *nlmsg = NULL;
|
||||||
|
@@ -2450,7 +2450,7 @@ nm_platform_ip6_address_add (NMPlatform *self,
|
|||||||
struct in6_addr peer_address,
|
struct in6_addr peer_address,
|
||||||
guint32 lifetime,
|
guint32 lifetime,
|
||||||
guint32 preferred,
|
guint32 preferred,
|
||||||
guint flags)
|
guint32 flags)
|
||||||
{
|
{
|
||||||
_CHECK_SELF (self, klass, FALSE);
|
_CHECK_SELF (self, klass, FALSE);
|
||||||
|
|
||||||
|
@@ -269,7 +269,7 @@ struct _NMPlatformIP6Address {
|
|||||||
__NMPlatformIPAddress_COMMON;
|
__NMPlatformIPAddress_COMMON;
|
||||||
struct in6_addr address;
|
struct in6_addr address;
|
||||||
struct in6_addr peer_address;
|
struct in6_addr peer_address;
|
||||||
guint flags; /* ifa_flags from <linux/if_addr.h>, field type "unsigned int" is as used in rtnl_addr_get_flags. */
|
guint32 flags; /* ifa_flags from <linux/if_addr.h>, field type "unsigned int" is as used in rtnl_addr_get_flags. */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
@@ -594,7 +594,7 @@ typedef struct {
|
|||||||
struct in6_addr peer_address,
|
struct in6_addr peer_address,
|
||||||
guint32 lifetime,
|
guint32 lifetime,
|
||||||
guint32 preferred_lft,
|
guint32 preferred_lft,
|
||||||
guint flags);
|
guint32 flags);
|
||||||
gboolean (*ip4_address_delete) (NMPlatform *, int ifindex, in_addr_t address, int plen, in_addr_t peer_address);
|
gboolean (*ip4_address_delete) (NMPlatform *, int ifindex, in_addr_t address, int plen, in_addr_t peer_address);
|
||||||
gboolean (*ip6_address_delete) (NMPlatform *, int ifindex, struct in6_addr address, int plen);
|
gboolean (*ip6_address_delete) (NMPlatform *, int ifindex, struct in6_addr address, int plen);
|
||||||
const NMPlatformIP4Address *(*ip4_address_get) (NMPlatform *, int ifindex, in_addr_t address, int plen, in_addr_t peer_address);
|
const NMPlatformIP4Address *(*ip4_address_get) (NMPlatform *, int ifindex, in_addr_t address, int plen, in_addr_t peer_address);
|
||||||
@@ -861,7 +861,7 @@ gboolean nm_platform_ip6_address_add (NMPlatform *self,
|
|||||||
struct in6_addr peer_address,
|
struct in6_addr peer_address,
|
||||||
guint32 lifetime,
|
guint32 lifetime,
|
||||||
guint32 preferred_lft,
|
guint32 preferred_lft,
|
||||||
guint flags);
|
guint32 flags);
|
||||||
gboolean nm_platform_ip4_address_delete (NMPlatform *self, int ifindex, in_addr_t address, int plen, in_addr_t peer_address);
|
gboolean nm_platform_ip4_address_delete (NMPlatform *self, int ifindex, in_addr_t address, int plen, in_addr_t peer_address);
|
||||||
gboolean nm_platform_ip6_address_delete (NMPlatform *self, int ifindex, struct in6_addr address, int plen);
|
gboolean nm_platform_ip6_address_delete (NMPlatform *self, int ifindex, struct in6_addr address, int plen);
|
||||||
gboolean nm_platform_ip4_address_sync (NMPlatform *self, int ifindex, const GArray *known_addresses, GPtrArray **out_added_addresses);
|
gboolean nm_platform_ip4_address_sync (NMPlatform *self, int ifindex, const GArray *known_addresses, GPtrArray **out_added_addresses);
|
||||||
|
@@ -45,7 +45,7 @@ test_cleanup_internal (void)
|
|||||||
int preferred = NM_PLATFORM_LIFETIME_PERMANENT;
|
int preferred = NM_PLATFORM_LIFETIME_PERMANENT;
|
||||||
int metric = 20;
|
int metric = 20;
|
||||||
int mss = 1000;
|
int mss = 1000;
|
||||||
guint flags = 0;
|
guint32 flags = 0;
|
||||||
|
|
||||||
inet_pton (AF_INET, "192.0.2.1", &addr4);
|
inet_pton (AF_INET, "192.0.2.1", &addr4);
|
||||||
inet_pton (AF_INET, "192.0.3.0", &network4);
|
inet_pton (AF_INET, "192.0.3.0", &network4);
|
||||||
|
@@ -564,7 +564,7 @@ _ip_address_add (gboolean external_command,
|
|||||||
guint32 lifetime,
|
guint32 lifetime,
|
||||||
guint32 preferred,
|
guint32 preferred,
|
||||||
const char *label,
|
const char *label,
|
||||||
guint flags)
|
guint32 flags)
|
||||||
{
|
{
|
||||||
gint64 end_time;
|
gint64 end_time;
|
||||||
|
|
||||||
@@ -1028,7 +1028,7 @@ nmtstp_ip6_address_add (gboolean external_command,
|
|||||||
struct in6_addr peer_address,
|
struct in6_addr peer_address,
|
||||||
guint32 lifetime,
|
guint32 lifetime,
|
||||||
guint32 preferred,
|
guint32 preferred,
|
||||||
guint flags)
|
guint32 flags)
|
||||||
{
|
{
|
||||||
_ip_address_add (external_command,
|
_ip_address_add (external_command,
|
||||||
FALSE,
|
FALSE,
|
||||||
|
Reference in New Issue
Block a user