diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2014-02-11 08:31:24 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2014-02-14 20:57:32 +0100 |
commit | 8495bc0176185ca77eae770a33b3463ca2bc0f25 (patch) | |
tree | f8f7672f9bb7967b9d29d6cb07880677b066fd4f /ubus.c | |
parent | 1ed34c73c45ee55fd677e8bb2a14e1fb83da26b4 (diff) |
netifd : Fix ubus route src mask printing
Fix printing of route src mask attribute when it contains 3 digits
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'ubus.c')
-rw-r--r-- | ubus.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -497,7 +497,7 @@ interface_ip_dump_route_list(struct interface_ip_settings *ip, bool enabled) buf = blobmsg_alloc_string_buffer(&b, "source", buflen); inet_ntop(af, &route->source, buf, buflen); - snprintf(buf + strlen(buf), 4, "/%u", route->sourcemask); + snprintf(buf + strlen(buf), buflen - strlen(buf), "/%u", route->sourcemask); blobmsg_add_string_buffer(&b); blobmsg_close_table(&b, r); |