aboutsummaryrefslogtreecommitdiffstats
path: root/src/vat
diff options
context:
space:
mode:
authorjackiechen1985 <xiaobo.chen@tieto.com>2019-04-29 12:00:43 +0800
committerDave Barach <openvpp@barachs.net>2019-05-06 12:03:24 +0000
commit56bc738dc371f6d5384f5772087899bdac42fc17 (patch)
treecbd8e4a0fc449a795f73f9667139a021962e93ec /src/vat
parentfa0c1f4dfc91726140d868d9077bfb3e25c1f1fe (diff)
Fix VPP-1487 DHCP client does not support option 6-domain server
Change-Id: I36ad1ef2a53af3d3f3a6348bc189b17e9e4e21bd Signed-off-by: jackiechen1985 <xiaobo.chen@tieto.com>
Diffstat (limited to 'src/vat')
-rw-r--r--src/vat/api_format.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index d2c125d5f72..fb0f3fdbf1d 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -2697,13 +2697,22 @@ vl_api_ip_details_t_handler_json (vl_api_ip_details_t * mp)
static void
vl_api_dhcp_compl_event_t_handler (vl_api_dhcp_compl_event_t * mp)
{
- errmsg ("DHCP compl event: pid %d %s hostname %s host_addr %U "
- "router_addr %U host_mac %U",
- ntohl (mp->pid), mp->lease.is_ipv6 ? "ipv6" : "ipv4",
- mp->lease.hostname,
- format_ip4_address, &mp->lease.host_address,
- format_ip4_address, &mp->lease.router_address,
- format_ethernet_address, mp->lease.host_mac);
+ u8 *s, i;
+
+ s = format (s, "DHCP compl event: pid %d %s hostname %s host_addr %U "
+ "host_mac %U router_addr %U",
+ ntohl (mp->pid), mp->lease.is_ipv6 ? "ipv6" : "ipv4",
+ mp->lease.hostname,
+ format_ip4_address, mp->lease.host_address,
+ format_ethernet_address, mp->lease.host_mac,
+ format_ip4_address, mp->lease.router_address);
+
+ for (i = 0; i < mp->lease.count; i++)
+ s =
+ format (s, " domain_server_addr %U", format_ip4_address,
+ mp->lease.domain_server[i].address);
+
+ errmsg ((char *) s);
}
static void vl_api_dhcp_compl_event_t_handler_json