mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
ethtool: fix missing NLM_F_MULTI flag when dumping
[ Upstream commitcf754ae331] 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:365f9ae4ee("ethtool: fix genlmsg_put() failure handling in ethnl_default_dumpit()") Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
673422b97e
commit
26b7924707
@@ -384,7 +384,8 @@ static int ethnl_default_dump_one(struct sk_buff *skb, struct net_device *dev,
|
||||
int ret;
|
||||
|
||||
ehdr = genlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq,
|
||||
ðtool_genl_family, 0, ctx->ops->reply_cmd);
|
||||
ðtool_genl_family, NLM_F_MULTI,
|
||||
ctx->ops->reply_cmd);
|
||||
if (!ehdr)
|
||||
return -EMSGSIZE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user