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] [day] [month] [year] [list]
Date:	Wed, 24 Feb 2016 10:15:50 -0800
From:	Tom Herbert <tom@...bertland.com>
To:	Alexander Duyck <aduyck@...antis.com>
Cc:	Linux Kernel Network Developers <netdev@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Alexander Duyck <alexander.duyck@...il.com>
Subject: Re: [net-next PATCH 5/5] eth: Pull header from first fragment via eth_get_headlen

On Wed, Feb 24, 2016 at 9:30 AM, Alexander Duyck <aduyck@...antis.com> wrote:
> We want to try and pull the L4 header in if it is available in the first
> fragment.  As such add the flag to indicate we want to pull the headers on
> the first fragment in.
>
> Signed-off-by: Alexander Duyck <aduyck@...antis.com>

Acked-by: Tom Herbert <tom@...bertland.com>

> ---
>  net/ethernet/eth.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
> index 103871784e50..66dff5e3d772 100644
> --- a/net/ethernet/eth.c
> +++ b/net/ethernet/eth.c
> @@ -125,6 +125,7 @@ EXPORT_SYMBOL(eth_header);
>   */
>  u32 eth_get_headlen(void *data, unsigned int len)
>  {
> +       const unsigned int flags = FLOW_DISSECTOR_F_PARSE_1ST_FRAG;
>         const struct ethhdr *eth = (const struct ethhdr *)data;
>         struct flow_keys keys;
>
> @@ -134,7 +135,7 @@ u32 eth_get_headlen(void *data, unsigned int len)
>
>         /* parse any remaining L2/L3 headers, check for L4 */
>         if (!skb_flow_dissect_flow_keys_buf(&keys, data, eth->h_proto,
> -                                           sizeof(*eth), len, 0))
> +                                           sizeof(*eth), len, flags))
>                 return max_t(u32, keys.control.thoff, sizeof(*eth));
>
>         /* parse for any L4 headers */
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ