IP address dump - don't send subnets for unnumbered interfaces
Change-Id: I8c64a0d2f757d96ffa7fd042c23b0d814217c215
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c
index 2b85247..d835773 100644
--- a/src/vnet/ip/ip_api.c
+++ b/src/vnet/ip/ip_api.c
@@ -1395,8 +1395,11 @@
if (mp->is_ipv6)
{
/* *INDENT-OFF* */
- foreach_ip_interface_address (lm6, ia, sw_if_index,
- 1 /* honor unnumbered */,
+ /* Do not send subnet details of the IP-interface for
+ * unnumbered interfaces. otherwise listening clients
+ * will be confused that the subnet is applied on more
+ * than one interface */
+ foreach_ip_interface_address (lm6, ia, sw_if_index, 0,
({
r6 = ip_interface_address_get_address (lm6, ia);
u16 prefix_length = ia->address_length;
@@ -1408,8 +1411,7 @@
else
{
/* *INDENT-OFF* */
- foreach_ip_interface_address (lm4, ia, sw_if_index,
- 1 /* honor unnumbered */,
+ foreach_ip_interface_address (lm4, ia, sw_if_index, 0,
({
r4 = ip_interface_address_get_address (lm4, ia);
u16 prefix_length = ia->address_length;