Repository : ssh://git@open-mesh.org/batctl
On branch : master
commit 1d7dba848f64ffceec4ad1df2deb0055f57602b0 Author: Sven Eckelmann sven@narfation.org Date: Sat Jul 13 07:47:38 2019 +0200
batctl: Fix command restriction for meshif-only prefix
The allowed commands for a meshif prefix are evaluated by comparing the type bits. These are initialized completely when allowing non-meshif and meshif commands. But a meshif-only prefix did an OR without previously setting the types bitfield to 0. This could have allowed too many commands than expected.
Fixes: 23f39261428e ("batctl: Replace '-m meshif' option with selector prefix") Signed-off-by: Sven Eckelmann sven@narfation.org
1d7dba848f64ffceec4ad1df2deb0055f57602b0 main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/main.c b/main.c index 974d551..99a5f5c 100644 --- a/main.c +++ b/main.c @@ -159,7 +159,7 @@ static const struct command *find_command_by_types(uint32_t types,
static const struct command *find_command(struct state *state, const char *name) { - uint32_t types; + uint32_t types = 0;
switch (state->selector) { case SP_NONE_OR_MESHIF: