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]
Date:   Wed, 30 Aug 2017 11:36:13 -0600
From:   David Ahern <dsahern@...il.com>
To:     Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org
Cc:     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

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?

> +		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