From nobody Mon Mar 2 08:33:58 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38D7E366DAB; Fri, 20 Feb 2026 18:54:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771613657; cv=none; b=si0dTmjsb/UHdE0iNsLqSdz3Pgcj+iUP9jc5/ALOQNIJUbz2fWjltu55s3mYPDZurLdSvbnvKp85UR2LZrYzhislqofHRa0+ROky8RkgPGtlRE0o5beJEMfkuX0cW9u6HSEWXm4bdAyG9kujzvlg1uUA8iZvc0CltEc/BEnqde8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771613657; c=relaxed/simple; bh=VT10bXnZOZstjp5Z5qwmfPi+JX233sJrsM9ySP83Dxo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ukr5VCu5vz6XZnbhddV7hBx8ar6Txmp94nHUKX+NYDqAP3qYJwozVSpSFgGajeGvNPsA9n85G3+3AmeH9ZVPlzhJjMoQ9I5XZD5SJVnBnTnsIBKqQvGtOgfkgYODAfHAfHvIOiUbtgyx7H5WRbjC1tOzmlqbysBH8XSy0OZHaj8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hf5h3Tz6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hf5h3Tz6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2CD83C19425; Fri, 20 Feb 2026 18:54:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771613657; bh=VT10bXnZOZstjp5Z5qwmfPi+JX233sJrsM9ySP83Dxo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=hf5h3Tz6+sMQQLjbFBrnQcBFWC0SlXNRV7/ZmwKPx8SdCo0uH/vdIRzBc+DT7Pp9y a2wEEoZbbUip647+RucobHmgI0g9IMZ/HGMS/RpnagkTkdkJTv3cadSJDXLT/82NPN vGCqyZG4HARi3x0dxnEPIWJWhXeEdc3qI3Uiq5T629p4i0Gf82jZJlnaGtnD4dKw6I +dePGqXTblVj1c4tPrky48oGqUZWwxn8WV8pNx2E5oGPZg6XD9BBSY32aDq8gOM7SB b6o0Iq/iDhGrrSbUQGreVkxTBpb5VOwx4Vg4OSa/1dvT5H6lv0OTaUHerF/wFjWeDV 5F5u47e+m3qMg== From: "Matthieu Baerts (NGI0)" Date: Fri, 20 Feb 2026 19:54:01 +0100 Subject: [PATCH iproute2-next 1/3] mptcp: uniform stream closure Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260220-ipr-monitor-json-v1-1-eb4b0d5f7820@kernel.org> References: <20260220-ipr-monitor-json-v1-0-eb4b0d5f7820@kernel.org> In-Reply-To: <20260220-ipr-monitor-json-v1-0-eb4b0d5f7820@kernel.org> To: Stephen Hemminger , David Ahern Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev, "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=917; i=matttbe@kernel.org; h=from:subject:message-id; bh=VT10bXnZOZstjp5Z5qwmfPi+JX233sJrsM9ySP83Dxo=; b=kA0DAAoWfCLwwvNHCpcByyZiAGmYrdTIGeRqWFY3yOeED5a6jA9m2fRAjZwlfr2z6xRlfcuMM Yh1BAAWCgAdFiEEG4ZZb5nneg10Sk44fCLwwvNHCpcFAmmYrdQACgkQfCLwwvNHCpf31AEA9+5g w8WnKnsu/TFb5KAEF+wDUT70Z2ruCYR1aNIENfoA/i2pjaRb0MEYKlyQKCzT0DLv1mMUTqWD40q ilEs9444L X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Use print_nl() instead of print_string(), close the json object, then flush the stream to flush the end of the JSON object ASAP. Signed-off-by: Matthieu Baerts (NGI0) --- ip/ipmptcp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ip/ipmptcp.c b/ip/ipmptcp.c index ec9ef62a..18ec05a8 100644 --- a/ip/ipmptcp.c +++ b/ip/ipmptcp.c @@ -273,8 +273,8 @@ static int print_mptcp_addrinfo(struct rtattr *addrinfo) } } =20 + print_nl(); close_json_object(); - print_string(PRINT_FP, NULL, "\n", NULL); fflush(stdout); =20 return 0; @@ -426,9 +426,11 @@ static int print_mptcp_limit(struct nlmsghdr *n, void = *arg) =20 print_uint(PRINT_ANY, "subflows", "subflows %d ", val); } - print_string(PRINT_FP, NULL, "%s", "\n"); - fflush(stdout); + + print_nl(); close_json_object(); + fflush(stdout); + return 0; } =20 --=20 2.51.0