[PATCH v2] Add VRF support
Beniamino Galvani
bgalvani at redhat.com
Wed Oct 21 09:12:35 PDT 2015
On Tue, Oct 20, 2015 at 07:10:35PM -0700, David Ahern wrote:
> v2
> - add symbol export
> - additional error checking in vrf support
> - enhanced test to use all APIs
>
> +static int vrf_parse(struct rtnl_link *link, struct nlattr *data,
> + struct nlattr *xstats)
> +{
> + struct nlattr *tb[IFLA_VXLAN_MAX+1];
IFLA_VRF_MAX
> + struct vrf_info *vi;
> + int err;
> +
> + NL_DBG(3, "Parsing VRF link info");
> +
> + if ((err = nla_parse_nested(tb, IFLA_VRF_MAX, data, vrf_policy))< 0)
Nitpick: add space before '<'.
> +int rtnl_link_vrf_set_tableid(struct rtnl_link *link, uint32_t id)
> +{
> + struct vrf_info *vi = link->l_info;
> +
> + IS_VRF_LINK_ASSERT(link);
> + if(id > VRF_TABLE_ID_MAX)
> + return -NLE_INVAL;
Isn't VRF_TABLE_ID_MAX the maximum value allowed for uint32_t?
Beniamino
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20151021/777bddee/attachment.sig>
More information about the libnl
mailing list