Skip to contentSkip to conversation

batctl: netlink: fix resetting mcast_flags_priv to unsupported state

PATCH Applied Linus Lüssing 2 participants 2 messages Mar 20, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 batctl: netlink: fix resetting mcast_flags_priv to unsupported state

This fixes a copy & paste error detected by Coverity.

Fixes b56061058113 ("batctl: add netlink dump function for multicast flags table")
Reported-by [email protected]
---
 netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
netlink.c +1 -1
index ab7be1e..f0fd1d9 100644
@@ -252,7 +252,7 @@ static int info_callback(struct nl_msg *msg, void *arg)
 		if (attrs[BATADV_ATTR_MCAST_FLAGS_PRIV])
 			mcast_flags_priv = nla_get_u32(attrs[BATADV_ATTR_MCAST_FLAGS_PRIV]);
 		else
-			mcast_flags = -EOPNOTSUPP;
+			mcast_flags_priv = -EOPNOTSUPP;
 
 		switch (opts->nl_cmd) {
 		case BATADV_CMD_GET_TRANSTABLE_LOCAL:
Signature · 1 line
2.11.0
#1 lore raw
Quoted 8 lines · On Dienstag, 20. März 2018 02:19:24 CET Linus Lüssing wrote:

This fixes a copy & paste error detected by Coverity.

Fixes b56061058113 ("batctl: add netlink dump function for multicast flags table")
Reported-by [email protected]
---
 netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied as 15f6d90 [1].

Thanks,
Sven

[1] https://git.open-mesh.org/batctl.git/commit/15f6d908fe3d152fc7a4c682231d13fbf1b8751e