[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86911e8d-2818-67f8-058b-ab2f4db33e55@cumulusnetworks.com>
Date: Wed, 10 Apr 2019 09:55:23 -0700
From: David Ahern <dsa@...ulusnetworks.com>
To: Johannes Berg <johannes@...solutions.net>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org
Cc: Pablo Neira Ayuso <pablo@...filter.org>,
Johannes Berg <johannes.berg@...el.com>
Subject: Re: [PATCH 2/6] netlink: make validation more configurable for future
strictness
On 4/3/19 11:54 PM, Johannes Berg wrote:
> @@ -280,6 +287,12 @@ static int validate_nla(const struct nlattr *nla, int maxtype,
> break;
>
> case NLA_UNSPEC:
> + if (validate & NL_VALIDATE_UNSPEC) {
> + NL_SET_ERR_MSG_ATTR(extack, nla,
> + "Attribute not understood");
I found that confusing when I did a trial run for a new route attribute.
How about "Unsupported attribute"?
> + return -EINVAL;
> + }
> + /* fall through */
> case NLA_MIN_LEN:
> if (attrlen < pt->len)
> goto out_err;
Powered by blists - more mailing lists