diff options
author | Patrick McHardy <kaber@trash.net> | 2015-04-12 21:10:42 +0100 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2015-06-02 13:04:00 +0200 |
commit | a93bc1795b272174a10d90961a248f2c620bfa2c (patch) | |
tree | 3609cbe3382dde7018493db6116e449e26919301 /src/datatype.c | |
parent | 6377380bc265f8446f912420f393ef978acf6698 (diff) |
netlink: handle concat expressions in set data
Reconstruct the concat expressions in set data by splicing off the
subtype values based on the keytype of the set.
Signed-off-by: Patrick McHardy
Diffstat (limited to 'src/datatype.c')
-rw-r--r-- | src/datatype.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/datatype.c b/src/datatype.c index a06a58e2..ca834263 100644 --- a/src/datatype.c +++ b/src/datatype.c @@ -932,7 +932,7 @@ const struct datatype *concat_type_alloc(uint32_t type) unsigned int size = 0, subtypes = 0, n; n = div_round_up(fls(type), TYPE_BITS); - while (concat_subtype_id(type, --n)) { + while (n > 0 && concat_subtype_id(type, --n)) { i = concat_subtype_lookup(type, n); if (i == NULL) return NULL; |