summaryrefslogtreecommitdiffstats
path: root/net/ipv6/rpl_iptunnel.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* net: ipv6: rpl_iptunnel: simplify the return expression of rpl_do_srh()Zheng Yongjun2020-12-091-6/+1
| | | | | | | Simplify the return expression. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ipv6: rpl*: Fix strange kerneldoc warnings due to bad headerAndrew Lunn2020-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | net/ipv6/rpl_iptunnel.c:15: warning: cannot understand function prototype: 'struct rpl_iptunnel_encap ' The header on the file containing the author copyright message uses kerneldoc /** opener. This confuses the parser when it gets to struct rpl_iptunnel_encap { struct ipv6_rpl_sr_hdr srh[0]; }; Similarly: net//ipv6/rpl.c:10: warning: Function parameter or member 'x' not described in 'IPV6_PFXTAIL_LEN' where IPV6_PFXTAIL_LEN is a macro definition, not a function. Convert the header comments to a plain /* comment. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20201028013123.931816-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* net: ipv6: Use struct_size() helper and kcalloc()Gustavo A. R. Silva2020-06-241-2/+1
| | | | | | | | | | | | | Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. Also, remove unnecessary function ipv6_rpl_srh_alloc_size() and replace kzalloc() with kcalloc(), which has a 2-factor argument form for multiplication. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ipv6: rpl_iptunnel: remove redundant assignments to variable errColin Ian King2020-04-021-1/+1
| | | | | | | | | | The variable err is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ipv6: rpl_iptunnel: Fix potential memory leak in rpl_do_srh_inlineGustavo A. R. Silva2020-03-311-1/+3
| | | | | | | | | | In case memory resources for buf were allocated, release them before return. Addresses-Coverity-ID: 1492011 ("Resource leak") Fixes: a7a29f9c361f ("net: ipv6: add rpl sr tunnel") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ipv6: add rpl sr tunnelAlexander Aring2020-03-301-0/+380
This patch adds functionality to configure routes for RPL source routing functionality. There is no IPIP functionality yet implemented which can be added later when the cases when to use IPv6 encapuslation comes more clear. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>