[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170811192806.4910368f@griffin>
Date: Fri, 11 Aug 2017 19:28:06 +0200
From: Jiri Benc <jbenc@...hat.com>
To: David Ahern <dsahern@...il.com>
Cc: Roopa Prabhu <roopa@...ulusnetworks.com>,
Girish Moodalbail <girish.moodalbail@...cle.com>,
pravin shelar <pshelar@....org>,
"davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Matthias Schiffer <mschiffer@...verse-factory.net>
Subject: Re: [PATCH net-next v2] vxlan: change vxlan_[config_]validate() to
use netlink_ext_ack for error reporting
On Fri, 11 Aug 2017 11:17:54 -0600, David Ahern wrote:
> What if a user adds IFLA_INFO_DATA but adds no vxlan attributes under
> it? Still not a valid config, but it passes the !data check.
Part of the checking is done in the newlink callback (vxlan_nl2conf).
Not nice but that's how it is. It's out of scope of this patch to
change that. (It's also not easy - most of the newlink logic would have
to be repeated in validate.)
The !data check needs to be done prior to blindly dereferencing into
data. It's currently in the validate callback. A bit chaotic but it
works. This patch just adds error messages.
> Whatever attributes are required but missing should be the message
> returned.
See the message I proposed in the previous email. newlink will take
care of the rest.
Feel free to submit cleanups, the vxlan driver could use them.
Jiri
Powered by blists - more mailing lists