aboutsummaryrefslogtreecommitdiffstats
path: root/netlink
diff options
context:
space:
mode:
Diffstat (limited to 'netlink')
-rw-r--r--netlink/librtnl/mapper.c2
-rw-r--r--netlink/librtnl/rtnl.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/netlink/librtnl/mapper.c b/netlink/librtnl/mapper.c
index 6d39e92..dd53684 100644
--- a/netlink/librtnl/mapper.c
+++ b/netlink/librtnl/mapper.c
@@ -63,7 +63,6 @@ int mapper_add_del_route(mapper_ns_t *ns, ns_route_t *route, int del)
if (route->rtm.rtm_dst_len >= 8 && route->dst[0] == 0xff)
return 0;
- clib_warning("Adding v6 route");
struct ip6_main_t *im = &ip6_main;
ip6_add_del_route_next_hop(im, //ip6_main
del?IP6_ROUTE_FLAG_DEL:IP6_ROUTE_FLAG_ADD, //flags (not del)
@@ -75,7 +74,6 @@ int mapper_add_del_route(mapper_ns_t *ns, ns_route_t *route, int del)
~0, //adj_index
ns->v6fib_index);
} else {
- clib_warning("Adding v4 route");
struct ip4_main_t *im = &ip4_main;
ip4_add_del_route_next_hop(im, //ip4_main
del?IP4_ROUTE_FLAG_DEL:IP4_ROUTE_FLAG_ADD, //flags (not del)
diff --git a/netlink/librtnl/rtnl.c b/netlink/librtnl/rtnl.c
index d66c2ee..04f0440 100644
--- a/netlink/librtnl/rtnl.c
+++ b/netlink/librtnl/rtnl.c
@@ -86,7 +86,7 @@ u8 *format_rtnl_nsname2path(u8 *s, va_list *args)
} else if (strpbrk(nsname, "/") != NULL) {
return format(s, "%s", nsname);
} else {
- return format((u8 *)0, "/var/run/netns/%s", nsname);
+ return format(s, "/var/run/netns/%s", nsname);
}
}
@@ -552,8 +552,10 @@ rtnl_stream_open(rtnl_stream_t *template)
rtnl_ns_t *ns;
int fd;
u8 *s = format((u8 *)0, "%U", format_rtnl_nsname2path, template->name);
+ vec_add1(s, 0);
if ((fd = open((char *)s, O_RDONLY)) < 0) {
+ clib_unix_warning("open stream %s: ", s);
vec_free(s);
return ~0;
}