diff options
author | Neale Ranns <neale.ranns@cisco.com> | 2018-05-17 09:38:13 -0700 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-05-18 07:51:58 +0000 |
commit | 4f2db7d79fafad342ae9dac049ca5c5ee2e0a144 (patch) | |
tree | e08a15f38960fd79453582bd5da725d5df2a6ed0 /src | |
parent | 4b10cb53186c127f2085a3b89250078fa8726bb3 (diff) |
IP address dump - don't send subnets for unnumbered interfaces
Change-Id: I8c64a0d2f757d96ffa7fd042c23b0d814217c215
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/ip/ip_api.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c index 2b85247bb27..d83577320ce 100644 --- a/src/vnet/ip/ip_api.c +++ b/src/vnet/ip/ip_api.c @@ -1395,8 +1395,11 @@ vl_api_ip_address_dump_t_handler (vl_api_ip_address_dump_t * mp) 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 @@ vl_api_ip_address_dump_t_handler (vl_api_ip_address_dump_t * mp) 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; |