From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com ([74.125.82.67]:40012 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751595AbeCMVpZ (ORCPT ); Tue, 13 Mar 2018 17:45:25 -0400 Received: by mail-wm0-f67.google.com with SMTP id t6so661110wmt.5 for ; Tue, 13 Mar 2018 14:45:25 -0700 (PDT) Message-ID: <1520977521.30787.1.camel@debian.org> Subject: Re: [PATCH iproute2] treat "default" and "all"/"any" parameters differenty From: Luca Boccassi To: Alexander Zubkov , Stephen Hemminger Cc: "netdev@vger.kernel.org" Date: Tue, 13 Mar 2018 21:45:21 +0000 In-Reply-To: <3ded09a4-54f9-9d82-d952-33527a6a3e58@msu.ru> References: <1520942521.12414.1.camel@debian.org> <3ded09a4-54f9-9d82-d952-33527a6a3e58@msu.ru> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-eoxjQQ28rF+NZ9o26gkP" Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org List-ID: --=-eoxjQQ28rF+NZ9o26gkP Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2018-03-13 at 21:19 +0100, Alexander Zubkov wrote: > Debian maintainer found that basic command: > # ip route flush all > No longer worked as expected which breaks user scripts and > expectations. It no longer flushed all IPv4 routes. >=20 > Recently behaviour of "default" prefix parameter was corrected. But > at > the same time behaviour of "all"/"any" was altered too, because they > were the same branch of the code. As those parameters mean different, > they need to be treated differently in code too. This patch reflects > the difference. >=20 > Reported-by: Luca Boccassi > Signed-off-by: Alexander Zubkov > --- > =C2=A0 lib/utils.c | 3 ++- > =C2=A0 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/lib/utils.c b/lib/utils.c > index 9fa5220..b289d9c 100644 > --- a/lib/utils.c > +++ b/lib/utils.c > @@ -658,7 +658,8 @@ int get_prefix_1(inet_prefix *dst, char *arg, > int=C2=A0 > family) > =C2=A0=C2=A0 dst->family =3D family; > =C2=A0=C2=A0 dst->bytelen =3D 0; > =C2=A0=C2=A0 dst->bitlen =3D 0; > - dst->flags |=3D PREFIXLEN_SPECIFIED; > + if (strcmp(arg, "default") =3D=3D 0) > + dst->flags |=3D PREFIXLEN_SPECIFIED; > =C2=A0=C2=A0 return 0; > =C2=A0=C2=A0 } >=20 > -- > 1.9.1 Tested-by: Luca Boccassi Yep solves the problem, ls all/any now work as before. Thanks! --=20 Kind regards, Luca Boccassi --=-eoxjQQ28rF+NZ9o26gkP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEE6g0RLAGYhL9yp9G8SylmgFB4UWIFAlqoRnEACgkQSylmgFB4 UWJIFwf9GwAkUSkBaeyQmMgDvOxXh5+DkiwjmKit5h4+FJm0LaPzB6J/3KpsCVLW B5xs0TnGTKxgFcYNJsuDjKS8dVW05uUSRfO1TkoSsZ+/9l9BXP88QqS9twhmoh4g ezMi6/08OipCu7V3e+pG7Gzqd7uH9WEH0vaSgmz7RlucSt1DqAhyUwoBjynEZJI5 6YqiGha60hN0+EAlBuUDBLrTSl44Po+h/IN13BFHlD/NlLz/SJYUX0SAYUr+cmhO VlGb71q5n3yfGur4G+4a5JHvSjuFc6oJLEYxjs42WC1p5QwO+LINxSRUR40r/6YT 9+a3v0rsV46Nq2LmO7hgEMC2ev4HEA== =4DYI -----END PGP SIGNATURE----- --=-eoxjQQ28rF+NZ9o26gkP--