[PATCH libnl] lib: route: rule: add rule_groups to cache ops

Thomas Haller thaller at redhat.com
Thu Feb 15 01:24:03 PST 2018


On Wed, 2018-02-14 at 14:29 -0800, Roopa Prabhu wrote:
> From: Roopa Prabhu <roopa at cumulusnetworks.com>
> 
> Signed-off-by: Roopa Prabhu <roopa at cumulusnetworks.com>
> Acked-by: David Ahern <dsa at cumulusnetworks.com>
> ---
>  lib/route/rule.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/lib/route/rule.c b/lib/route/rule.c
> index e257349..ff5ba09 100644
> --- a/lib/route/rule.c
> +++ b/lib/route/rule.c
> @@ -783,6 +783,12 @@ static struct nl_object_ops rule_obj_ops = {
>  	.oo_id_attrs		= ~0,
>  };
>  
> +static struct nl_af_group rule_groups[] = {
> +	{ AF_INET,	RTNLGRP_IPV4_RULE },
> +	{ AF_INET6,	RTNLGRP_IPV6_RULE },
> +	{ END_OF_GROUP_LIST },
> +};
> +
>  static struct nl_cache_ops rtnl_rule_ops = {
>  	.co_name		= "route/rule",
>  	.co_hdrsize		= sizeof(struct fib_rule_hdr),
> @@ -796,6 +802,7 @@ static struct nl_cache_ops rtnl_rule_ops = {
>  	.co_request_update	= rule_request_update,
>  	.co_msg_parser		= rule_msg_parser,
>  	.co_obj_ops		= &rule_obj_ops,
> +	.co_groups		= rule_groups,
>  };
>  
>  static void __init rule_init(void)


Hi Roopa,

merged as https://github.com/thom311/libnl/commit/988b0cc0ca56c785b54eec17eecfb57d02832ed7

Thanks!!
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20180215/9c68ebbf/attachment.sig>


More information about the libnl mailing list