lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170831071758.GA1973@nanopsycho>
Date:   Thu, 31 Aug 2017 09:17:58 +0200
From:   Jiri Pirko <jiri@...nulli.us>
To:     David Ahern <dsahern@...il.com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, arkadis@...lanox.com,
        idosch@...lanox.com, mlxsw@...lanox.com
Subject: Re: [patch net-next 3/8] mlxsw: spectrum_dpipe: Add IPv6 host table
 initial support

Wed, Aug 30, 2017 at 07:36:13PM CEST, dsahern@...il.com wrote:
>On 8/30/17 6:03 AM, Jiri Pirko wrote:
>> @@ -328,9 +329,21 @@ static int mlxsw_sp_dpipe_table_host_matches_dump(struct sk_buff *skb, int type)
>>  	if (err)
>>  		return err;
>>  
>> -	match.type = DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT;
>> -	match.header = &devlink_dpipe_header_ipv4;
>> -	match.field_id = DEVLINK_DPIPE_FIELD_IPV4_DST_IP;
>> +	switch (type) {
>> +	case AF_INET:
>> +		match.type = DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT;
>> +		match.header = &devlink_dpipe_header_ipv4;
>> +		match.field_id = DEVLINK_DPIPE_FIELD_IPV4_DST_IP;
>> +		break;
>> +	case AF_INET6:
>> +		match.type = DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT;
>> +		match.header = &devlink_dpipe_header_ipv6;
>> +		match.field_id = DEVLINK_DPIPE_FIELD_IPV6_DST_IP;
>> +		break;
>> +	default:
>> +		WARN_ON(1);
>
>Why a warn for dump request of an unsupported family?

It's a handling of default case that should not happen unless there is a
bug in kernel.


>
>> +		return -EINVAL;
>> +	}
>>  
>>  	return devlink_dpipe_match_put(skb, &match);
>>  }
>> @@ -342,7 +355,7 @@ mlxsw_sp_dpipe_table_host4_matches_dump(void *priv, struct sk_buff *skb)
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ