Re: [PATCH iproute2 1/3] iplink: Improve index parameter handling

2017-12-19 Thread Serhey Popovich
Stephen Hemminger wrote: > On Mon, 18 Dec 2017 23:37:09 +0200 > Serhey Popovich wrote: > >> Stephen Hemminger wrote: >>> On Mon, 18 Dec 2017 23:02:07 +0200 >>> Serhey Popovich wrote: >>> Stephen Hemminger wrote: > On Mon, 18 Dec 2017 20:54:06 +0200 > Serhey Popovych wrote: >>>

Re: [PATCH iproute2 1/3] iplink: Improve index parameter handling

2017-12-19 Thread Stephen Hemminger
On Mon, 18 Dec 2017 23:37:09 +0200 Serhey Popovich wrote: > Stephen Hemminger wrote: > > On Mon, 18 Dec 2017 23:02:07 +0200 > > Serhey Popovich wrote: > > > >> Stephen Hemminger wrote: > >>> On Mon, 18 Dec 2017 20:54:06 +0200 > >>> Serhey Popovych wrote: > >>> > diff --git a/ip/i

Re: [PATCH iproute2 1/3] iplink: Improve index parameter handling

2017-12-18 Thread Serhey Popovich
Stephen Hemminger wrote: > On Mon, 18 Dec 2017 23:02:07 +0200 > Serhey Popovich wrote: > >> Stephen Hemminger wrote: >>> On Mon, 18 Dec 2017 20:54:06 +0200 >>> Serhey Popovych wrote: >>> diff --git a/ip/iplink.c b/ip/iplink.c index 1e685cc..4f9c169 100644 --- a/ip/iplink.c

Re: [PATCH iproute2 1/3] iplink: Improve index parameter handling

2017-12-18 Thread Stephen Hemminger
On Mon, 18 Dec 2017 23:02:07 +0200 Serhey Popovich wrote: > Stephen Hemminger wrote: > > On Mon, 18 Dec 2017 20:54:06 +0200 > > Serhey Popovych wrote: > > > >> diff --git a/ip/iplink.c b/ip/iplink.c > >> index 1e685cc..4f9c169 100644 > >> --- a/ip/iplink.c > >> +++ b/ip/iplink.c > >> @@ -586,

Re: [PATCH iproute2 1/3] iplink: Improve index parameter handling

2017-12-18 Thread Serhey Popovich
Stephen Hemminger wrote: > On Mon, 18 Dec 2017 20:54:06 +0200 > Serhey Popovych wrote: > >> diff --git a/ip/iplink.c b/ip/iplink.c >> index 1e685cc..4f9c169 100644 >> --- a/ip/iplink.c >> +++ b/ip/iplink.c >> @@ -586,8 +586,10 @@ int iplink_parse(int argc, char **argv, struct >> iplink_req *req,

Re: [PATCH iproute2 1/3] iplink: Improve index parameter handling

2017-12-18 Thread Stephen Hemminger
On Mon, 18 Dec 2017 20:54:06 +0200 Serhey Popovych wrote: > diff --git a/ip/iplink.c b/ip/iplink.c > index 1e685cc..4f9c169 100644 > --- a/ip/iplink.c > +++ b/ip/iplink.c > @@ -586,8 +586,10 @@ int iplink_parse(int argc, char **argv, struct > iplink_req *req, > *name = *arg

[PATCH iproute2 1/3] iplink: Improve index parameter handling

2017-12-18 Thread Serhey Popovych
Correctly check for valid network device index supplied on command line: indexes are always greather than zero. Check for duplicate "index" argument. Initialize @index to 0 to simplify handling it in iplink_modify(). Other callers (link_veth.c, iplink_vxcan.c) already did so. No need to initializ