Skip to contentSkip to conversation

bridge/mdb: remove wrong use of NLM_F_MULTI

PATCH In review Nicolas Dichtel 2 participants 2 messages Sep 6, 2019 – Sep 10, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 bridge/mdb: remove wrong use of NLM_F_MULTI

NLM_F_MULTI must be used only when a NLMSG_DONE message is sent at the end. In fact, NLMSG_DONE is sent only at the end of a dump.

Libraries like libnl will wait forever for NLMSG_DONE.

Fixes 949f1e39a617 ("bridge: mdb: notify on router port add and del")
CC Nikolay Aleksandrov <[email protected]>

---

v2:
add netdev and bridge ml :D
remove Satish Ashok <[email protected]> (its mail bounces)

 net/bridge/br_mdb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/bridge/br_mdb.c +1 -1
index bf6acd34234d..63f9c08625f0 100644
@@ -437,7 +437,7 @@ static int nlmsg_populate_rtr_fill(struct sk_buff *skb,
 	struct nlmsghdr *nlh;
 	struct nlattr *nest;
 
-	nlh = nlmsg_put(skb, pid, seq, type, sizeof(*bpm), NLM_F_MULTI);
+	nlh = nlmsg_put(skb, pid, seq, type, sizeof(*bpm), 0);
 	if (!nlh)
 		return -EMSGSIZE;
 
Signature · 1 line
2.21.0
maintainer
#1 lore raw

From: Nicolas Dichtel <[email protected]>
Date: Fri, 6 Sep 2019 11:47:02 +0200

Quoted 9 lines

NLM_F_MULTI must be used only when a NLMSG_DONE message is sent at the end. In fact, NLMSG_DONE is sent only at the end of a dump.

Libraries like libnl will wait forever for NLMSG_DONE.

Fixes 949f1e39a617 ("bridge: mdb: notify on router port add and del")
CC Nikolay Aleksandrov <[email protected]>

Applied and queued up for -stable.