On Fri, 11 Aug 2017 10:56:57 -0600, David Ahern wrote:
> I would argue none of those messages are sufficient. The message should
> tell the user what is missing.

Good point.

I guess "The IFLA_INFO_DATA attribute is missing" would be a better
message. It can happen only when you're implementing your own
management tool, it's not that you'll get this message out of the ip
tool, thus referring to netlink attributes should be okay.

> What is the point of the !data check anyway? Based on the rest of the
> validate function neither IFLA_VXLAN_ID or IFLA_VXLAN_PORT_RANGE are
> required attributes.

The newlink callback assumes data is not NULL, i.e. IFLA_INFO_DATA is
present. It would crash otherwise.

 Jiri

Reply via email to