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