summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-09-27 07:52:11 (GMT)
committerThomas Haller <thaller@redhat.com>2016-09-27 08:46:34 (GMT)
commit0ec5b11ec3ccd6253827c4190de1c48424437731 (patch)
tree576cb7ccc48b8feac5ff8f9f586f556f1663f48b /include
parent4b28f70d2b8a12fc455fe878d12d32df47df4e7b (diff)
downloadlibnl-0ec5b11ec3ccd6253827c4190de1c48424437731.zip
libnl-0ec5b11ec3ccd6253827c4190de1c48424437731.tar.gz
libnl-0ec5b11ec3ccd6253827c4190de1c48424437731.tar.bz2
macvlan: adjust types and merge MACVLAN_HAS_MACCOUNT and MACVLAN_HAS_MACDATA
mvi_maccount only makes sense together with the data. They should be treated as one setting, and both should be consistent. That means, if there are no addresses, mvi_maccount should always be set to zero. This is regardless of whether the mvi_mask indicates that MACVLAN_HAS_MACADDR is set. Similarly, if mvi_maccount is larger then zero, the mvi_macaddr must point to some valid addresses. The only exception is, when mvi_maccount is zero, mvi_macaddr may be NULL or point to some data of zero allocated bytes. Also, ensure that uint32_t is used for all the types that compare with mvi_maccount. Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/netlink/route/link/macvlan.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/netlink/route/link/macvlan.h b/include/netlink/route/link/macvlan.h
index 0fc6810..15a6cc1 100644
--- a/include/netlink/route/link/macvlan.h
+++ b/include/netlink/route/link/macvlan.h
@@ -50,7 +50,7 @@ extern int rtnl_link_macvlan_get_macmode(struct rtnl_link *link,
extern int rtnl_link_macvlan_count_macaddr(struct rtnl_link *link,
uint32_t *out_count);
extern int rtnl_link_macvlan_get_macaddr(struct rtnl_link *link,
- unsigned int idx,
+ uint32_t idx,
const struct nl_addr **addr);
extern int rtnl_link_macvlan_add_macaddr(struct rtnl_link *link,
struct nl_addr *addr);