Re: [PATCH net-next 08/20] rtnetlink: Update rtnl_dump_ifinfo for strict data checking

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 07:29:13PM -0600, David Ahern wrote: > On 10/7/18 4:29 AM, Christian Brauner wrote: > >> I thought about that, but there is so much overlap - they are mostly > >> common. Besides, ifinfomsg is the header for link dumps, and ifinfomsg > >> is the one that has been (ab)used fo

Re: [PATCH net-next 08/20] rtnetlink: Update rtnl_dump_ifinfo for strict data checking

2018-10-07 Thread David Ahern
On 10/7/18 4:29 AM, Christian Brauner wrote: >> I thought about that, but there is so much overlap - they are mostly >> common. Besides, ifinfomsg is the header for link dumps, and ifinfomsg >> is the one that has been (ab)used for other message types, so strict >> versus lenient does not really ha

Re: [PATCH net-next 08/20] rtnetlink: Update rtnl_dump_ifinfo for strict data checking

2018-10-07 Thread Christian Brauner
On Fri, Oct 05, 2018 at 01:22:24PM -0600, David Ahern wrote: > On 10/5/18 11:59 AM, Christian Brauner wrote: > >> + err = nlmsg_parse(nlh, hdrlen, tb, IFLA_MAX, ifla_policy, extack); > >> + if (err < 0) { > >> + if (cb->strict_check) > >> + return -EINVAL; > >> +

Re: [PATCH net-next 08/20] rtnetlink: Update rtnl_dump_ifinfo for strict data checking

2018-10-05 Thread David Ahern
On 10/5/18 11:59 AM, Christian Brauner wrote: >> +err = nlmsg_parse(nlh, hdrlen, tb, IFLA_MAX, ifla_policy, extack); >> +if (err < 0) { >> +if (cb->strict_check) >> +return -EINVAL; >> +goto walk_entries; >> +} >> >> -if (master_

Re: [PATCH net-next 08/20] rtnetlink: Update rtnl_dump_ifinfo for strict data checking

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:43PM -0700, David Ahern wrote: > From: David Ahern > > Update rtnl_dump_ifinfo for strict data checking. If the flag is set, > the dump request is expected to have an ifinfomsg struct as the header > potentially followed by one or more attributes. Any data passed in

[PATCH net-next 08/20] rtnetlink: Update rtnl_dump_ifinfo for strict data checking

2018-10-04 Thread David Ahern
From: David Ahern Update rtnl_dump_ifinfo for strict data checking. If the flag is set, the dump request is expected to have an ifinfomsg struct as the header potentially followed by one or more attributes. Any data passed in the header or as an attribute is taken as a request to influence the da