[PATCH] introduce ip6 tunnel

Thomas Haller thaller at redhat.com
Mon May 12 06:26:23 PDT 2014


On Sat, 2014-05-10 at 10:18 +0530, Susant Sahani wrote:
> This patch adds support for ip6 tunnel works with
> ip6_tunnel kernel module
> 
> Signed-off-by: Susant Sahani <susant at redhat.com>



Hi Susant,


I attach a patch with several minor fixups. If you agree, could you
apply them on your patch?





Two further comments:


> +
> +/**
> + * Get IP6_TNL tunnel local address
> + * @arg link            Link object
> + *
> + * @return local address value
> + */
> +int rtnl_link_ip6_tnl_get_local(struct rtnl_link *link, struct in6_addr *addr)


Not included in include/netlink/route/link/ip6tnl.h and doc/route.txt.


Also, the @return comment is wrong. What should the int value tell?
Other getter functions don't return any error code, so returning an
error code here seems inconsistent.

How about returning the input argument @addr (type "struct in6_addr *")
instead?

Same for rtnl_link_ip6_tnl_get_remote().








> +	return ip6_tnl->tos;
> +}
> +
> +/**
> + * Set IP6_TNL tunnel path MTU discovery


^^^^^ Is this the correct comment?

> + * @arg link            Link object
> + * @arg encap_limit     
> + *
> + * @return 0 on success or a negative error code
> + */
> +int rtnl_link_ip6_tnl_set_encaplimit(struct rtnl_link *link, uint8_t encap_limit)
> +{
> +	struct ip6_tnl_info *ip6_tnl = link->l_info;
> +



The rest looks good to me.


Thanks,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fixup-introduce-ip6-tunnel.patch
Type: text/x-patch
Size: 6449 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20140512/143b4f51/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20140512/143b4f51/attachment-0001.sig>


More information about the libnl mailing list