diff options
author | David Ahern <dsa@cumulusnetworks.com> | 2015-12-18 17:50:03 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-02-12 17:09:04 (GMT) |
commit | a09b8558148b31e469d463907d103fa78d81612c (patch) | |
tree | 0ecd7ff2d09af28256b69d612beea3f0a6aff3ca /lib/netfilter | |
parent | 58396ae2ae7c91fb95d1de9654be5b12fd2343d2 (diff) | |
download | libnl-a09b8558148b31e469d463907d103fa78d81612c.zip libnl-a09b8558148b31e469d463907d103fa78d81612c.tar.gz libnl-a09b8558148b31e469d463907d103fa78d81612c.tar.bz2 |
lib: update ce-mask to uint64_t
lib/route/link.c already defines 32 attributes which fills the current
uint32_t used for ce_mask. To accommodate more attributes the mask needs
to be expanded. This patch updates the definition to uint64_t.
The nl_object_diff API is maintained for ABI with existing users. A new
nl_object_diff64 API is added for the expanded attribute list. The MSB
of the 32-bit API is used to indicate if higher order attributes had a
mismatch. (Suggested by Thomas).
Note that LINK_ATTR_LINK_NETNSID changes. But since the attribute flags
are not public API it shouldn't be a problem.
http://lists.infradead.org/pipermail/libnl/2015-December/002078.html
http://lists.infradead.org/pipermail/libnl/2015-December/002083.html
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'lib/netfilter')
-rw-r--r-- | lib/netfilter/ct_obj.c | 6 | ||||
-rw-r--r-- | lib/netfilter/exp_obj.c | 6 | ||||
-rw-r--r-- | lib/netfilter/log_obj.c | 6 | ||||
-rw-r--r-- | lib/netfilter/queue_obj.c | 6 |
4 files changed, 12 insertions, 12 deletions
diff --git a/lib/netfilter/ct_obj.c b/lib/netfilter/ct_obj.c index c8af870..1079ec0 100644 --- a/lib/netfilter/ct_obj.c +++ b/lib/netfilter/ct_obj.c @@ -297,12 +297,12 @@ static void ct_dump_stats(struct nl_object *a, struct nl_dump_params *p) } } -static int ct_compare(struct nl_object *_a, struct nl_object *_b, - uint32_t attrs, int flags) +static uint64_t ct_compare(struct nl_object *_a, struct nl_object *_b, + uint64_t attrs, int flags) { struct nfnl_ct *a = (struct nfnl_ct *) _a; struct nfnl_ct *b = (struct nfnl_ct *) _b; - int diff = 0; + uint64_t diff = 0; #define CT_DIFF(ATTR, EXPR) ATTR_DIFF(attrs, CT_ATTR_##ATTR, a, b, EXPR) #define CT_DIFF_VAL(ATTR, FIELD) CT_DIFF(ATTR, a->FIELD != b->FIELD) diff --git a/lib/netfilter/exp_obj.c b/lib/netfilter/exp_obj.c index 591cf45..aef43b7 100644 --- a/lib/netfilter/exp_obj.c +++ b/lib/netfilter/exp_obj.c @@ -301,12 +301,12 @@ static int exp_cmp_l4proto_icmp (union nfnl_exp_protodata *a, union nfnl_exp_pro return d; } -static int exp_compare(struct nl_object *_a, struct nl_object *_b, - uint32_t attrs, int flags) +static uint64_t exp_compare(struct nl_object *_a, struct nl_object *_b, + uint64_t attrs, int flags) { struct nfnl_exp *a = (struct nfnl_exp *) _a; struct nfnl_exp *b = (struct nfnl_exp *) _b; - int diff = 0; + uint64_t diff = 0; #define EXP_DIFF(ATTR, EXPR) ATTR_DIFF(attrs, EXP_ATTR_##ATTR, a, b, EXPR) #define EXP_DIFF_VAL(ATTR, FIELD) EXP_DIFF(ATTR, a->FIELD != b->FIELD) diff --git a/lib/netfilter/log_obj.c b/lib/netfilter/log_obj.c index 3fdb347..65985d8 100644 --- a/lib/netfilter/log_obj.c +++ b/lib/netfilter/log_obj.c @@ -229,12 +229,12 @@ unsigned int nfnl_log_str2flags(const char *name) return __str2flags(name, log_flags, ARRAY_SIZE(log_flags)); } -static int nfnl_log_compare(struct nl_object *_a, struct nl_object *_b, - uint32_t attrs, int flags) +static uint64_t nfnl_log_compare(struct nl_object *_a, struct nl_object *_b, + uint64_t attrs, int flags) { struct nfnl_log *a = (struct nfnl_log *) _a; struct nfnl_log *b = (struct nfnl_log *) _b; - int diff = 0; + uint64_t diff = 0; #define NFNL_LOG_DIFF(ATTR, EXPR) \ ATTR_DIFF(attrs, LOG_ATTR_##ATTR, a, b, EXPR) diff --git a/lib/netfilter/queue_obj.c b/lib/netfilter/queue_obj.c index 36ed3c5..040bbed 100644 --- a/lib/netfilter/queue_obj.c +++ b/lib/netfilter/queue_obj.c @@ -161,12 +161,12 @@ uint32_t nfnl_queue_get_copy_range(const struct nfnl_queue *queue) return queue->queue_copy_range; } -static int nfnl_queue_compare(struct nl_object *_a, struct nl_object *_b, - uint32_t attrs, int flags) +static uint64_t nfnl_queue_compare(struct nl_object *_a, struct nl_object *_b, + uint64_t attrs, int flags) { struct nfnl_queue *a = (struct nfnl_queue *) _a; struct nfnl_queue *b = (struct nfnl_queue *) _b; - int diff = 0; + uint64_t diff = 0; #define NFNL_QUEUE_DIFF(ATTR, EXPR) \ ATTR_DIFF(attrs, QUEUE_ATTR_##ATTR, a, b, EXPR) |