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:   Wed, 20 Nov 2019 13:08:39 +0800
From:   Xin Long <lucien.xin@...il.com>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc:     network dev <netdev@...r.kernel.org>, davem <davem@...emloft.net>,
        Simon Horman <simon.horman@...ronome.com>
Subject: Re: [PATCH net-next 1/4] net: sched: add vxlan option support to act_tunnel_key

On Wed, Nov 20, 2019 at 8:12 AM Jakub Kicinski
<jakub.kicinski@...ronome.com> wrote:
>
> On Tue, 19 Nov 2019 17:31:46 +0800, Xin Long wrote:
> > @@ -54,6 +55,7 @@ static int tunnel_key_act(struct sk_buff *skb, const struct tc_action *a,
> >  static const struct nla_policy
> >  enc_opts_policy[TCA_TUNNEL_KEY_ENC_OPTS_MAX + 1] = {
>
> [TCA_TUNNEL_KEY_ENC_OPTS_UNSPEC] =
>         { .strict_start_type = TCA_TUNNEL_KEY_ENC_OPTS_VXLAN, }
>
> >       [TCA_TUNNEL_KEY_ENC_OPTS_GENEVE]        = { .type = NLA_NESTED },
> > +     [TCA_TUNNEL_KEY_ENC_OPTS_VXLAN]         = { .type = NLA_NESTED },
> >  };
Agree, this one is necessary.

> >
> >  static const struct nla_policy
> > @@ -64,6 +66,11 @@ geneve_opt_policy[TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX + 1] = {
> >                                                      .len = 128 },
> >  };
> >
> > +static const struct nla_policy
> > +vxlan_opt_policy[TCA_TUNNEL_KEY_ENC_OPT_VXLAN_MAX + 1] = {
>
> [TCA_TUNNEL_KEY_ENC_OPT_VXLAN_UNSPEC] =
>         { .strict_type_start = TCA_TUNNEL_KEY_ENC_OPT_VXLAN_UNSPEC + 1, }
>
> > +     [TCA_TUNNEL_KEY_ENC_OPT_VXLAN_GBP]         = { .type = NLA_U32 },
> > +};
> > +
But vxlan_opt_policy is a new policy, and it will be parsed by
nla_parse_nested()
where NL_VALIDATE_STRICT has been used.

.strict_type_start is used for setting NL_VALIDATE_STRICT for some new
option appending on an old policy.

So I think .strict_type_start is not needed here.

> >  static int
> >  tunnel_key_copy_geneve_opt(const struct nlattr *nla, void *dst, int dst_len,
> >                          struct netlink_ext_ack *extack)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ