From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luca Boccassi Subject: Re: [PATCH] iprule: Fix destination prefix output Date: Tue, 28 Aug 2018 16:38:45 +0100 Message-ID: <1535470725.1113.12.camel@debian.org> References: <1535466449-24190-1-git-send-email-stefan.bader@canonical.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-l4/WYUtJ5g/5wejf99PH" Cc: Stephen Hemminger , Christian Ehrhardt To: Stefan Bader , netdev@vger.kernel.org Return-path: Received: from mail-wm0-f67.google.com ([74.125.82.67]:55524 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726383AbeH1TbF (ORCPT ); Tue, 28 Aug 2018 15:31:05 -0400 Received: by mail-wm0-f67.google.com with SMTP id f21-v6so2400777wmc.5 for ; Tue, 28 Aug 2018 08:38:51 -0700 (PDT) In-Reply-To: <1535466449-24190-1-git-send-email-stefan.bader@canonical.com> Sender: netdev-owner@vger.kernel.org List-ID: --=-l4/WYUtJ5g/5wejf99PH Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2018-08-28 at 16:27 +0200, Stefan Bader wrote: > When adding support for JSON output the new code for printing > the destination prefix adds a stray blank character before > the bitmask. This causes some user-space parsing to fail. >=20 > Current output: > =C2=A0 ...: from x.x.x.x/l to y.y.y.y /l > Previous output: > =C2=A0 ...: from x.x.x.x/l to y.y.y.y/l >=20 > Fixes: 0dd4ccc5 "iprule: add json support" > Signed-off-by: Stefan Bader > --- > =C2=A0ip/iprule.c | 2 +- > =C2=A01 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/ip/iprule.c b/ip/iprule.c > index 8b94214..744d6d8 100644 > --- a/ip/iprule.c > +++ b/ip/iprule.c > @@ -239,7 +239,7 @@ int print_rule(const struct sockaddr_nl *who, > struct nlmsghdr *n, void *arg) > =C2=A0 > =C2=A0 print_string(PRINT_FP, NULL, "to ", NULL); > =C2=A0 print_color_string(PRINT_ANY, ifa_family_color(frh- > >family), > - =C2=A0=C2=A0=C2=A0"dst", "%s ", dst); > + =C2=A0=C2=A0=C2=A0"dst", "%s", dst); > =C2=A0 if (frh->dst_len !=3D host_len) > =C2=A0 print_uint(PRINT_ANY, "dstlen", "/%u ", frh- > >dst_len); > =C2=A0 else Acked-by: Luca Boccassi --=20 Kind regards, Luca Boccassi --=-l4/WYUtJ5g/5wejf99PH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEE6g0RLAGYhL9yp9G8SylmgFB4UWIFAluFbIUACgkQSylmgFB4 UWJ2/wf/UHI7yLiywrEuPECZdsKGxQHpco4dhEk5i2dhegmp9PygOru7NzSUkwRt tmYB1n8fXeJGwz2Pbaj8n9Eg4FLSdv8kAqH/9wKJ5vcrkDGIZ2bIVudvjs5bP3vj wdksvU4rhrdXfOovf7uhBfL2REuu8m3M54rseUaR88I6CrdztIYMTzBNyZafFDRg u59bFyXgbM20SSSWWrpZp2vK+p2urRj3fB6Ku7GC0uJCXAweZXhH8n71rS1mgTMl zVrAApdT0flxHYlTcDuQ86I+4HgQqS6gtwOz8UM8rzjKnX/0OWVAAQwO74eigmn4 6DK18lMUSxwlIWzLvrk1EHdZWdEu6Q== =eZk2 -----END PGP SIGNATURE----- --=-l4/WYUtJ5g/5wejf99PH--