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: <b859c71d-c04f-8de2-03af-d6345c86842d@mellanox.com>
Date:   Thu, 26 Jan 2017 09:13:20 +0200
From:   Roi Dayan <roid@...lanox.com>
To:     Benjamin LaHaise <benjamin.lahaise@...ronome.com>,
        Stephen Hemminger <stephen@...workplumber.org>
CC:     Jamal Hadi Salim <jhs@...atatu.com>, <netdev@...r.kernel.org>,
        <bcrl@...ck.org>
Subject: Re: [PATCH v2 iproute2] f_flower: don't set TCA_FLOWER_KEY_ETH_TYPE
 for "protocol all"



On 20/01/2017 21:07, Benjamin LaHaise wrote:
> v2 - update to address changes in 00697ca19ae3e1118f2af82c3b41ac4335fe918b.
>
> When using the tc flower filter, rules marked with "protocol all" do not
> actually match all packets.  This is due to a bug in f_flower.c that passes
> in ETH_P_ALL in the TCA_FLOWER_KEY_ETH_TYPE attribute when adding a rule.
> Fix this by omitting TCA_FLOWER_KEY_ETH_TYPE if the protocol is set to
> ETH_P_ALL.
>      
> Fixes: 488b41d020fb ("tc: flower no need to specify the ethertype")
> Cc: Jamal Hadi Salim <jhs@...atatu.com>
> Signed-off-by: Benjamin LaHaise <benjamin.lahaise@...ronome.com>
> Signed-off-by: Benjamin LaHaise <bcrl@...ck.org>
>
> diff --git a/tc/f_flower.c b/tc/f_flower.c
> index 314c2dd..145a856 100644
> --- a/tc/f_flower.c
> +++ b/tc/f_flower.c
> @@ -529,9 +529,11 @@ parse_done:
>   	if (ret)
>   		return ret;
>   
> -	ret = addattr16(n, MAX_MSG, TCA_FLOWER_KEY_ETH_TYPE, eth_type);
> -	if (ret)
> -		return ret;
> +	if (eth_type != htons(ETH_P_ALL)) {
> +		ret = addattr16(n, MAX_MSG, TCA_FLOWER_KEY_ETH_TYPE, eth_type);
> +		if (ret)
> +			return ret;
> +	}
>   
>   	tail->rta_len = (((void *)n)+n->nlmsg_len) - (void *)tail;
>   

Reviewed-by: Roi Dayan <roid@...lanox.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ