Skip to content

Commit cf754ae

Browse files
ffmanceradavem330
authored andcommitted
ethtool: fix missing NLM_F_MULTI flag when dumping
When dumping the ethtool information from all the interfaces, the netlink reply should contain the NLM_F_MULTI flag. This flag allows userspace tools to identify that multiple messages are expected. Link: https://bugzilla.redhat.com/1953847 Fixes: 365f9ae ("ethtool: fix genlmsg_put() failure handling in ethnl_default_dumpit()") Signed-off-by: Fernando Fernandez Mancera <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4c7a942 commit cf754ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/ethtool/netlink.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,8 @@ static int ethnl_default_dump_one(struct sk_buff *skb, struct net_device *dev,
387387
int ret;
388388

389389
ehdr = genlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq,
390-
&ethtool_genl_family, 0, ctx->ops->reply_cmd);
390+
&ethtool_genl_family, NLM_F_MULTI,
391+
ctx->ops->reply_cmd);
391392
if (!ehdr)
392393
return -EMSGSIZE;
393394

0 commit comments

Comments
 (0)