[PATCH] libnl: Introduce ipip tunnel API
Thomas Graf
tgraf at suug.ch
Thu Apr 24 02:23:04 PDT 2014
On 04/23/14 at 11:20am, Susant Sahani wrote:
> This patch introduces ipip tunnel support.
LGTM, see some comments below. I'm fine with a v2 or with
follow-up patches.
Since the spotted issues are minor:
Acked-by: Thomas Graf <tgraf at suug.ch>
> + */
> +
> +/**
> + * @ingroup link
> + * @defgroup ipip IPIP
> + * ipip link module
> + *
> + * @details
> + * \b Link Type Name: "ipip"
> + *
> + * @route_doc{link_ipip, IPIP Documentation}
Can you do a follow-up patch which adds a short section to
doc/route.txt with a section name [link_ipip] to quickly
explain how to use this new module?
> +static int ipip_clone(struct rtnl_link *dst, struct rtnl_link *src)
> +{
> + struct ipip_info *ipip_dst, *ipip_src = src->l_info;
> + int err;
> +
> + dst->l_info = NULL;
> +
> + err = rtnl_link_set_type(dst, "ipip");
> + if (err < 0)
> + return err;
> +
> + ipip_dst = dst->l_info;
> +
> + if (!ipip_dst || !ipip_src)
> + return -NLE_NOMEM;
This looks a bit wrong. Is !ipip_src even possible? I would assume
we can only end up in ipip_clone() if the src is of type "ipip".
A BUG() statement might be better in this case.
> +int rtnl_link_ipip_tunnel_add(struct nl_sock *sk, const char *name)
> +{
It would be great to have a follow-up patch add documentation to these
public functions.
More information about the libnl
mailing list