Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-05 Thread David Miller
From: David Ahern Date: Fri, 5 Oct 2018 15:24:29 -0600 > On 10/5/18 3:22 PM, David Miller wrote: >> From: Mauricio Faria de Oliveira >> Date: Mon, 1 Oct 2018 22:50:32 -0300 >> >>> On Mon, Oct 1, 2018 at 12:38 PM Mauricio Faria de Oliveira >>> wrote: Ok, thanks for your suggestions. I

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-05 Thread David Miller
From: Mauricio Faria de Oliveira Date: Fri, 5 Oct 2018 18:46:47 -0300 > On Fri, Oct 5, 2018 at 6:24 PM David Ahern wrote: >> >> On 10/5/18 3:22 PM, David Miller wrote: >> > From: Mauricio Faria de Oliveira >> > Date: Mon, 1 Oct 2018 22:50:32 -0300 >> > >> >> On Mon, Oct 1, 2018 at 12:38 PM Maur

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-05 Thread Mauricio Faria de Oliveira
On Fri, Oct 5, 2018 at 6:24 PM David Ahern wrote: > > On 10/5/18 3:22 PM, David Miller wrote: > > From: Mauricio Faria de Oliveira > > Date: Mon, 1 Oct 2018 22:50:32 -0300 > > > >> On Mon, Oct 1, 2018 at 12:38 PM Mauricio Faria de Oliveira > >> wrote: > >>> Ok, thanks for your suggestions. > >>>

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-05 Thread David Ahern
On 10/5/18 3:22 PM, David Miller wrote: > From: Mauricio Faria de Oliveira > Date: Mon, 1 Oct 2018 22:50:32 -0300 > >> On Mon, Oct 1, 2018 at 12:38 PM Mauricio Faria de Oliveira >> wrote: >>> Ok, thanks for your suggestions. >>> I'll do some research/learning on them, and give it a try for a v2.

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-05 Thread David Miller
From: Mauricio Faria de Oliveira Date: Mon, 1 Oct 2018 22:50:32 -0300 > On Mon, Oct 1, 2018 at 12:38 PM Mauricio Faria de Oliveira > wrote: >> Ok, thanks for your suggestions. >> I'll do some research/learning on them, and give it a try for a v2. > > FYI, that is "[PATCH v2 net-next] rtnetlink:

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-01 Thread Mauricio Faria de Oliveira
On Mon, Oct 1, 2018 at 12:38 PM Mauricio Faria de Oliveira wrote: > Ok, thanks for your suggestions. > I'll do some research/learning on them, and give it a try for a v2. FYI, that is "[PATCH v2 net-next] rtnetlink: fix rtnl_fdb_dump() for ndmsg header". BTW, could please advise whether this sho

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-01 Thread Mauricio Faria de Oliveira
On Mon, Oct 1, 2018 at 12:01 PM David Ahern wrote: > > On 10/1/18 6:44 AM, Mauricio Faria de Oliveira wrote: > >> I suspect rtnl_fdb_dump is forever stuck with the ifinfomsg struct as > >> the header if any kernel side filtering is to be done. [snip] > > > > Why exactly? I understand currently t

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-01 Thread David Ahern
On 10/1/18 6:44 AM, Mauricio Faria de Oliveira wrote: >> I suspect rtnl_fdb_dump is forever stuck with the ifinfomsg struct as >> the header if any kernel side filtering is to be done. [snip] > > Why exactly? I understand currently there may be little information > to distinguish family headers,

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-01 Thread Mauricio Faria de Oliveira
On Sun, Sep 30, 2018 at 10:06 PM David Ahern wrote: > > On 9/28/18 1:35 PM, Mauricio Faria de Oliveira wrote: > > Currently, rtnl_fdb_dump() assumes the family header is 'struct ifinfomsg', > > which is not always true. For example, 'struct ndmsg' is used by iproute2 > > as well (in the 'ip neigh

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-09-30 Thread David Ahern
On 9/28/18 1:35 PM, Mauricio Faria de Oliveira wrote: > Currently, rtnl_fdb_dump() assumes the family header is 'struct ifinfomsg', > which is not always true. For example, 'struct ndmsg' is used by iproute2 > as well (in the 'ip neigh' command). > > The problem is, the function bails out early i

[PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-09-28 Thread Mauricio Faria de Oliveira
Currently, rtnl_fdb_dump() assumes the family header is 'struct ifinfomsg', which is not always true. For example, 'struct ndmsg' is used by iproute2 as well (in the 'ip neigh' command). The problem is, the function bails out early if nlmsg_parse() fails, which does occur for iproute2 usage of 's