From 1ee788dbb10445063d61e58bd3153a7e8e1fce4c Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Tue, 17 Oct 2017 22:16:44 +0200 Subject: [PATCH] ubus: display the point-to-point IPv4 address Display the point-to-point IPv4 address as well when dumping the IP address list in ubus. Signed-off-by: Hans Dedecker --- ubus.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ubus.c b/ubus.c index ebf9891..96bc247 100644 --- a/ubus.c +++ b/ubus.c @@ -441,6 +441,12 @@ interface_ip_dump_address_list(struct interface_ip_settings *ip, bool v6, bool e blobmsg_add_u32(&b, "mask", addr->mask); + if (addr->point_to_point) { + buf = blobmsg_alloc_string_buffer(&b, "ptpaddress", buflen); + inet_ntop(af, &addr->point_to_point, buf, buflen); + blobmsg_add_string_buffer(&b); + } + if (addr->preferred_until) { int preferred = addr->preferred_until - now; if (preferred < 0) -- 2.25.1