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:   Thu, 10 Aug 2017 15:12:13 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     William Tu <u9012063@...il.com>
Cc:     netdev@...r.kernel.org, Meenakshi Vohra <mvohra@...are.com>,
        Alexey Kuznetsov <kuznet@....inr.ac.ru>
Subject: Re: [PATCHv2 net-next iproute2] gre: add support for ERSPAN tunnel

On Thu, 10 Aug 2017 13:14:27 -0700
William Tu <u9012063@...il.com> wrote:

> +
> +		if (greinfo[IFLA_GRE_ERSPAN_INDEX])
> +			erspan_idx = rta_getattr_u32(greinfo[IFLA_GRE_ERSPAN_INDEX]);
>  	}

Are you missing a ntohl() here?

It is encoded as htonl() when sending to kernel.

 		addattr32(n, 1024, IFLA_GRE_FWMARK, fwmark);
+		addattr32(n, 1024, IFLA_GRE_ERSPAN_INDEX, htonl(erspan_idx));

Is erspan_idx == 0 a reserved value?
You should only send erspan_idx to kernel if it is given on command line.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ