lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <C4896FB061E7DE4AAC93031BDCA044B11A217B6B@IRSMSX108.ger.corp.intel.com>
Date:	Wed, 30 Mar 2016 07:19:52 +0000
From:	"Varlese, Marco" <marco.varlese@...el.com>
To:	Stephen Hemminger <stephen@...workplumber.org>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"davem@...emloft.net" <davem@...emloft.net>,
	Jiri Pirko <jiri@...nulli.us>,
	John Fastabend <john.fastabend@...il.com>,
	"jhs@...atatu.com" <jhs@...atatu.com>,
	"Szczerbik, PrzemyslawX" <przemyslawx.szczerbik@...el.com>
Subject: RE: [PATCH iproute2 v1 1/1] lib/utils: fix get_addr() and
 get_prefix() error messages


> -----Original Message-----
> From: netdev-owner@...r.kernel.org [mailto:netdev-owner@...r.kernel.org]
> On Behalf Of Stephen Hemminger
> Sent: Sunday, March 27, 2016 6:35 PM
> To: Varlese, Marco <marco.varlese@...el.com>
> Cc: netdev@...r.kernel.org; davem@...emloft.net; Jiri Pirko
<jiri@...nulli.us>;
> John Fastabend <john.fastabend@...il.com>; jhs@...atatu.com; Szczerbik,
> PrzemyslawX <przemyslawx.szczerbik@...el.com>
> Subject: Re: [PATCH iproute2 v1 1/1] lib/utils: fix get_addr() and
get_prefix()
> error messages
> 
> On Tue, 22 Mar 2016 13:02:02 +0000
> "Varlese, Marco" <marco.varlese@...el.com> wrote:
> 
> > An attempt to add invalid address to interface would print "???" string
> > instead of the address family name.
> >
> > For example:
> > $ ip address add 256.10.166.1/24 dev ens8
> > Error: ??? prefix is expected rather than "256.10.166.1/24".
> >
> > $ ip neighbor add proxy 2001:db8::g dev ens8
> > Error: ??? address is expected rather than "2001:db8::g".
> >
> > With this patch the output will look like:
> > $ ip address add 256.10.166.1/24 dev ens8
> > Error: inet prefix is expected rather than "256.10.166.1/24".
> >
> > $ ip neighbor add proxy 2001:db8::g dev ens8
> > Error: inet6 address is expected rather than "2001:db8::g".
> >
> > Signed-off-by: Przemyslaw Szczerbik <przemyslawx.szczerbik@...el.com>
> > Signed-off-by: Marco Varlese <marco.varlese@...el.com>
> > ---
> > lib/utils.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/lib/utils.c b/lib/utils.c
> > index fa35f4d..4820de1 100644
> > --- a/lib/utils.c
> > +++ b/lib/utils.c
> > @@ -567,7 +567,7 @@ int get_addr(inet_prefix *dst, const char *arg, int
> family)
> > {
> >         if (get_addr_1(dst, arg, family)) {
> >                 fprintf(stderr, "Error: %s address is expected rather than
\"%s\".\n",
> > -                               family_name(family) ,arg);
> > +                               family_name(dst->family), arg);
> >                 exit(1);
> >         }
> >         return 0;
> > @@ -581,7 +581,7 @@ int get_prefix(inet_prefix *dst, char *arg, int family)
> >         }
> >         if (get_prefix_1(dst, arg, family)) {
> >                 fprintf(stderr, "Error: %s prefix is expected rather than
\"%s\".\n",
> > -                               family_name(family) ,arg);
> > +                               family_name(dst->family), arg);
> >                 exit(1);
> >         }
> >         return 0;
> 
> Your patch was corrupted by your email client?
Yes, you're right; the patch got corrupted by the email client.
Sorry about that.
Looking into this now.

> 
> $ patch -p1
<~/Downloads/iproute2-v1-1-1-lib-utils-fix-get_addr-and-get_prefix-
> error-messages.patch
> patching file lib/utils.c
> patch: **** malformed patch at line 6: {

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4414 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ