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:
Thomas Haller
2016-02-29 15:36:12 +01:00
parent 83d8a9e094
commit e18cdc10d3
9 changed files with 15 additions and 14 deletions

View File

@@ -1147,7 +1147,7 @@ nmtst_platform_ip6_address (const char *address, const char *peer_address, guint
inline static NMPlatformIP6Address *
nmtst_platform_ip6_address_full (const char *address, const char *peer_address, guint plen,
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);

View File

@@ -5627,7 +5627,7 @@ rdisc_config_changed (NMRDisc *rdisc, NMRDiscConfigMap changed, NMDevice *self)
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
int i;
int system_support;
guint ifa_flags = 0x00;
guint32 ifa_flags = 0x00;
/*
* Check, whether kernel is recent enough to help user space handling RA.

View File

@@ -134,7 +134,7 @@ rdisc_config_changed (NMRDisc *rdisc, NMRDiscConfigMap changed, gpointer user_da
NMIP6Config *existing;
NMIP6Config *ip6_config;
static int system_support = -1;
guint ifa_flags = 0x00;
guint32 ifa_flags = 0x00;
int i;
if (system_support == -1) {

View File

@@ -937,7 +937,8 @@ ip6_address_add (NMPlatform *platform,
int plen,
struct in6_addr peer_addr,
guint32 lifetime,
guint32 preferred, guint flags)
guint32 preferred,
guint32 flags)
{
NMFakePlatformPrivate *priv = NM_FAKE_PLATFORM_GET_PRIVATE (platform);
NMPlatformIP6Address address;

View File

@@ -5214,7 +5214,7 @@ ip6_address_add (NMPlatform *platform,
struct in6_addr peer_addr,
guint32 lifetime,
guint32 preferred,
guint flags)
guint32 flags)
{
NMPObject obj_id;
nm_auto_nlmsg struct nl_msg *nlmsg = NULL;

View File

@@ -2450,7 +2450,7 @@ nm_platform_ip6_address_add (NMPlatform *self,
struct in6_addr peer_address,
guint32 lifetime,
guint32 preferred,
guint flags)
guint32 flags)
{
_CHECK_SELF (self, klass, FALSE);

View File

@@ -269,7 +269,7 @@ struct _NMPlatformIP6Address {
__NMPlatformIPAddress_COMMON;
struct in6_addr 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 {
@@ -594,7 +594,7 @@ typedef struct {
struct in6_addr peer_address,
guint32 lifetime,
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 (*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);
@@ -861,7 +861,7 @@ gboolean nm_platform_ip6_address_add (NMPlatform *self,
struct in6_addr peer_address,
guint32 lifetime,
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_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);

View File

@@ -45,7 +45,7 @@ test_cleanup_internal (void)
int preferred = NM_PLATFORM_LIFETIME_PERMANENT;
int metric = 20;
int mss = 1000;
guint flags = 0;
guint32 flags = 0;
inet_pton (AF_INET, "192.0.2.1", &addr4);
inet_pton (AF_INET, "192.0.3.0", &network4);

View File

@@ -564,7 +564,7 @@ _ip_address_add (gboolean external_command,
guint32 lifetime,
guint32 preferred,
const char *label,
guint flags)
guint32 flags)
{
gint64 end_time;
@@ -1028,7 +1028,7 @@ nmtstp_ip6_address_add (gboolean external_command,
struct in6_addr peer_address,
guint32 lifetime,
guint32 preferred,
guint flags)
guint32 flags)
{
_ip_address_add (external_command,
FALSE,