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: <928e929e-9e13-5a08-07d4-ad3f4758833f@gmail.com>
Date:   Mon, 11 Mar 2019 09:03:03 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Olga Albisser <olgabnd@...il.com>, netdev@...r.kernel.org
Cc:     Olga Albisser <olga@...isser.org>,
        Koen De Schepper <koen.de_schepper@...ia-bell-labs.com>,
        Oliver Tilmans <olivier.tilmans@...ia-bell-labs.com>,
        Bob Briscoe <research@...briscoe.net>,
        Henrik Steen <henrist@...rist.net>
Subject: Re: [PATCH net-next] sched: add dualpi2 scheduler module



On 03/11/2019 08:14 AM, Olga Albisser wrote:

> +
> +static u32 get_ecn_field(struct sk_buff *skb)
> +{
> +	switch (skb->protocol) {

tc_skb_protocol(skb)

> +	case cpu_to_be16(ETH_P_IP):

Theoretically you have to use pskb_may_pull() before assuming network header is in the linear part of skb (skb->head)

> +	return ipv4_get_dsfield(ip_hdr(skb)) & INET_ECN_MASK;
> +	case cpu_to_be16(ETH_P_IPV6):
> +		return ipv6_get_dsfield(ipv6_hdr(skb)) & INET_ECN_MASK;
> +	default:
> +		return 0;
> +	}
> +}
> 



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ