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: <CALnjE+qWmENWj_hL87++Sk=zzrvj2U0VAEW26ySAjg5RsDymuA@mail.gmail.com>
Date:	Tue, 29 Sep 2015 13:41:34 -0700
From:	Pravin Shelar <pshelar@...ira.com>
To:	Jiri Benc <jbenc@...hat.com>
Cc:	netdev <netdev@...r.kernel.org>,
	"dev@...nvswitch.org" <dev@...nvswitch.org>
Subject: Re: [PATCH net-next 1/2] openvswitch: add tunnel protocol to sw_flow_key

On Tue, Sep 29, 2015 at 10:52 AM, Jiri Benc <jbenc@...hat.com> wrote:
> Store tunnel protocol (AF_INET or AF_INET6) in sw_flow_key. This field now
> also acts as an indicator whether the flow contains tunnel data (this was
> previously indicated by tun_key.u.ipv4.dst being set but with IPv6 addresses
> in an union with IPv4 ones this won't work anymore).
>
> The new field was added to a hole in sw_flow_key.
>
> Signed-off-by: Jiri Benc <jbenc@...hat.com>
> ---
>  net/openvswitch/flow.c         | 4 ++--
>  net/openvswitch/flow.h         | 1 +
>  net/openvswitch/flow_netlink.c | 7 +++++--
>  net/openvswitch/flow_table.c   | 2 +-
>  4 files changed, 9 insertions(+), 5 deletions(-)
>
...

> diff --git a/net/openvswitch/flow.h b/net/openvswitch/flow.h
> index fe527d2dd4b7..5688e33e2de6 100644
> --- a/net/openvswitch/flow.h
> +++ b/net/openvswitch/flow.h
> @@ -63,6 +63,7 @@ struct sw_flow_key {
>                 u32     skb_mark;       /* SKB mark. */
>                 u16     in_port;        /* Input switch port (or DP_MAX_PORTS). */
>         } __packed phy; /* Safe when right after 'tun_key'. */
> +       u8 tun_proto;                   /* Protocol of encapsulating tunnel. */

We can add rather add TUNNEL_IPV6 flag to distinguish IPv4 and IPv6
tunnel keys. This can be stored in ip_tunnel_key.tun_flags. That also
saves space in flow key.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ