From: Jiri Pirko Date: Thu, 15 Dec 2022 17:00:56 +0000 (+0100) Subject: devlink: fix mon json output for trap-policer X-Git-Tag: v6.2.0~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e994cf69cfd55fefd000565914fd85e3ec150af;p=thirdparty%2Fiproute2.git devlink: fix mon json output for trap-policer 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 Reviewed-by: Ido Schimmel Signed-off-by: Stephen Hemminger --- diff --git a/devlink/devlink.c b/devlink/devlink.c index b865b83c8..ae93e7cb6 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c @@ -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 */