]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
devlink: fix mon json output for trap-policer
authorJiri Pirko <jiri@nvidia.com>
Thu, 15 Dec 2022 17:00:56 +0000 (18:00 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 19 Dec 2022 16:35:48 +0000 (08:35 -0800)
There is a json footer missed for trap-policer output in "devlink mon".
So add it and fix the json output.

Fixes: a66af5569337 ("devlink: Add devlink trap policer set and show commands")
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
devlink/devlink.c

index b865b83c826333d24ebfeb777a30db5fa1096524..ae93e7cb620ebd73246983308acc35ab8e27f3ac 100644 (file)
@@ -6741,6 +6741,7 @@ static int cmd_mon_show_cb(const struct nlmsghdr *nlh, void *data)
                        return MNL_CB_ERROR;
                pr_out_mon_header(genl->cmd);
                pr_out_trap_policer(dl, tb, false);
+               pr_out_mon_footer();
                break;
        case DEVLINK_CMD_LINECARD_GET: /* fall through */
        case DEVLINK_CMD_LINECARD_SET: /* fall through */