From d8172576c53aa3a67c73d2759c0e575a9fae30d4 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 5 May 2014 14:05:46 +0200 Subject: [PATCH 2/2] fixup! introduce ipip tunnel support --- lib/route/link/ipip.c | 14 ++++++-------- tests/.gitignore | 1 + tests/test-create-ipip.c | 6 ++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/lib/route/link/ipip.c b/lib/route/link/ipip.c index e25912b..2de29bf 100644 --- a/lib/route/link/ipip.c +++ b/lib/route/link/ipip.c @@ -155,8 +155,6 @@ static int ipip_put_attrs(struct nl_msg *msg, struct rtnl_link *link) nla_nest_end(msg, data); -nla_put_failure: - return 0; } @@ -337,7 +335,7 @@ int rtnl_link_ipip_set_link(struct rtnl_link *link, uint32_t index) * Get IPIP tunnel interface index * @arg link Link object * - * @return interface index value on success or a negative error code + * @return interface index value */ uint32_t rtnl_link_ipip_get_link(struct rtnl_link *link) { @@ -371,7 +369,7 @@ int rtnl_link_ipip_set_local(struct rtnl_link *link, uint32_t addr) * Get IPIP tunnel local address * @arg link Link object * - * @return local address value on success or a negative error code + * @return local address value */ uint32_t rtnl_link_ipip_get_local(struct rtnl_link *link) { @@ -405,7 +403,7 @@ int rtnl_link_ipip_set_remote(struct rtnl_link *link, uint32_t addr) * Get IPIP tunnel remote address * @arg link Link object * - * @return remote address on success or a negative error code + * @return remote address */ uint32_t rtnl_link_ipip_get_remote(struct rtnl_link *link) { @@ -439,7 +437,7 @@ int rtnl_link_ipip_set_ttl(struct rtnl_link *link, uint8_t ttl) * Get IPIP tunnel ttl * @arg link Link object * - * @return ttl value on success or a negative error code + * @return ttl value */ uint8_t rtnl_link_ipip_get_ttl(struct rtnl_link *link) { @@ -473,7 +471,7 @@ int rtnl_link_ipip_set_tos(struct rtnl_link *link, uint8_t tos) * Get IPIP tunnel tos * @arg link Link object * - * @return tos value on success or a negative error code + * @return tos value */ uint8_t rtnl_link_ipip_get_tos(struct rtnl_link *link) { @@ -507,7 +505,7 @@ int rtnl_link_ipip_set_pmtudisc(struct rtnl_link *link, uint8_t pmtudisc) * Get IPIP path MTU discovery * @arg link Link object * - * @return pmtudisc value on success or a negative error code + * @return pmtudisc value */ uint8_t rtnl_link_ipip_get_pmtudisc(struct rtnl_link *link) { diff --git a/tests/.gitignore b/tests/.gitignore index 007d503..eaf1736 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -7,6 +7,7 @@ /test-complex-HTB-with-hash-filters /test-create-bond /test-create-bridge +/test-create-ipip /test-create-veth /test-create-vlan /test-create-vxlan diff --git a/tests/test-create-ipip.c b/tests/test-create-ipip.c index f064e79..44b9b2c 100644 --- a/tests/test-create-ipip.c +++ b/tests/test-create-ipip.c @@ -1,7 +1,5 @@ -#include -#include -#include -#include +#include +#include int main(int argc, char *argv[]) { -- 1.9.0