Skip to content

Commit 78a2f5e

Browse files
Jiri Pirkokuba-moo
authored andcommitted
devlink: fix port new reply cmd type
Due to a c&p error, port new reply fills-up cmd with wrong value, any other existing port command replies and notifications. Fix it by filling cmd with value DEVLINK_CMD_PORT_NEW. Skimmed through devlink userspace implementations, none of them cares about this cmd value. Reported-by: Chenyuan Yang <[email protected]> Closes: https://lore.kernel.org/all/ZfZcDxGV3tSy4qsV@cy-server/ Fixes: cd76dcd ("devlink: Support add and delete devlink port") Signed-off-by: Jiri Pirko <[email protected]> Reviewed-by: Parav Pandit <[email protected]> Reviewed-by: Kalesh AP <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 956c0d6 commit 78a2f5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/devlink/port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ int devlink_nl_port_new_doit(struct sk_buff *skb, struct genl_info *info)
889889
err = -ENOMEM;
890890
goto err_out_port_del;
891891
}
892-
err = devlink_nl_port_fill(msg, devlink_port, DEVLINK_CMD_NEW,
892+
err = devlink_nl_port_fill(msg, devlink_port, DEVLINK_CMD_PORT_NEW,
893893
info->snd_portid, info->snd_seq, 0, NULL);
894894
if (WARN_ON_ONCE(err))
895895
goto err_out_msg_free;

0 commit comments

Comments
 (0)