Re: [ovs-dev] [PATCH] datapath/flow_netlink: Fix NDP flow mask validation

2014-07-11 Thread Thomas Graf
On 07/10/14 at 09:32am, Daniele Di Proietto wrote: > This cannot set tp.src to htons(0x), because icmpv6_key->icmpv6_type is > __u8. > > The bug has always been there, since a1c564be (datapath: Mega flow > implementation). > > datapath/flow.c:201 > > if (match->mask && (match->mask->

Re: [ovs-dev] [PATCH] datapath/flow_netlink: Fix NDP flow mask validation

2014-07-10 Thread Pravin Shelar
On Thu, Jul 10, 2014 at 9:32 AM, Daniele Di Proietto wrote: > On Jul 10, 2014, at 2:40 AM, Thomas Graf wrote: > >> On 07/09/14 at 03:22pm, Daniele Di Proietto wrote: >>> match_validate() enforce that a mask matching on NDP attributes has also an >>> exact match on ICMPv6 type. >>> The ICMPv6 type

Re: [ovs-dev] [PATCH] datapath/flow_netlink: Fix NDP flow mask validation

2014-07-10 Thread Daniele Di Proietto
On Jul 10, 2014, at 2:40 AM, Thomas Graf wrote: > On 07/09/14 at 03:22pm, Daniele Di Proietto wrote: >> match_validate() enforce that a mask matching on NDP attributes has also an >> exact match on ICMPv6 type. >> The ICMPv6 type, which is 8-bit wide, is stored in the 'tp.src' field of >> 'struct

Re: [ovs-dev] [PATCH] datapath/flow_netlink: Fix NDP flow mask validation

2014-07-10 Thread Thomas Graf
On 07/09/14 at 03:22pm, Daniele Di Proietto wrote: > match_validate() enforce that a mask matching on NDP attributes has also an > exact match on ICMPv6 type. > The ICMPv6 type, which is 8-bit wide, is stored in the 'tp.src' field of > 'struct sw_flow_key', which is 16-bit wide. > Therefore, an exa

[ovs-dev] [PATCH] datapath/flow_netlink: Fix NDP flow mask validation

2014-07-09 Thread Daniele Di Proietto
match_validate() enforce that a mask matching on NDP attributes has also an exact match on ICMPv6 type. The ICMPv6 type, which is 8-bit wide, is stored in the 'tp.src' field of 'struct sw_flow_key', which is 16-bit wide. Therefore, an exact match on ICMPv6 type should only check the first 8 bits.