Re: [PATCH 1/3] dev: Prevent creating network devices with negative ifindex

2017-06-16 Thread Serhey Popovych
>> What do you think? > > Passing -1 is an error, it doesn't make sense to try and be > helpful to buggy userland. Here is commit I actually change/fix: commit 9c7dafbfab15 ("net: Allow to create links with given ifindex") In this change done the opposite: check for ifm->ifi_index moved to regi

Re: [PATCH 1/3] dev: Prevent creating network devices with negative ifindex

2017-06-16 Thread Stephen Hemminger
On Fri, 16 Jun 2017 19:44:45 +0300 Serhey Popovych wrote: > > On Fri, 16 Jun 2017 17:23:51 +0300 > > Serhey Popovych wrote: > > > >> Interface index is signed integer, we can pass ifm->ifi_index > >> from userspace via netlink and create network device with > >> negative ifindex value. > >> >

Re: [PATCH 1/3] dev: Prevent creating network devices with negative ifindex

2017-06-16 Thread Serhey Popovych
> On Fri, 16 Jun 2017 17:23:51 +0300 > Serhey Popovych wrote: > >> Interface index is signed integer, we can pass ifm->ifi_index >> from userspace via netlink and create network device with >> negative ifindex value. >> >> Fixes: 9c7dafbfab15 ("net: Allow to create links with given ifindex") >>

Re: [PATCH 1/3] dev: Prevent creating network devices with negative ifindex

2017-06-16 Thread Stephen Hemminger
On Fri, 16 Jun 2017 17:23:51 +0300 Serhey Popovych wrote: > Interface index is signed integer, we can pass ifm->ifi_index > from userspace via netlink and create network device with > negative ifindex value. > > Fixes: 9c7dafbfab15 ("net: Allow to create links with given ifindex") > Signed-off-b

[PATCH 1/3] dev: Prevent creating network devices with negative ifindex

2017-06-16 Thread Serhey Popovych
Interface index is signed integer, we can pass ifm->ifi_index from userspace via netlink and create network device with negative ifindex value. Fixes: 9c7dafbfab15 ("net: Allow to create links with given ifindex") Signed-off-by: Serhey Popovych --- net/core/dev.c | 2 +- 1 file changed, 1 insert