[ovs-dev] [PATCH v3 5/6] datapath/flow_netlink: Validate IPv6 flow key and mask values.

Jarno Rajahalme jrajahalme at nicira.com
Mon Aug 11 16:09:44 UTC 2014


Thanks for the review, pushed to master with the proposed change.

  Jarno

On Aug 8, 2014, at 2:10 PM, Jesse Gross <jesse at nicira.com> wrote:

> On Fri, Aug 8, 2014 at 1:28 PM, Jarno Rajahalme <jrajahalme at nicira.com> wrote:
>> diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c
>> index e4cf535..294e54c 100644
>> --- a/datapath/flow_netlink.c
>> +++ b/datapath/flow_netlink.c
>> @@ -688,6 +688,11 @@ static int ovs_key_from_nlattrs(struct sw_flow_match *match, u64 attrs,
>>                                ipv6_key->ipv6_frag, OVS_FRAG_TYPE_MAX);
>>                        return -EINVAL;
>>                }
>> +               if (ntohl(ipv6_key->ipv6_label) & 0xFFF00000) {
> 
> It's marginally better if we put a htonl on the constant instead,
> since the compiler can do it for us.
> 
> Otherwise, this looks fine:
> Acked-by: Jesse Gross <jesse at nicira.com>




More information about the dev mailing list