Signed-off-by: Ben Pfaff <b...@ovn.org>
---
 ovn/utilities/ovn-nbctl.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c
index cc0ab15c9442..cfa1c525f77c 100644
--- a/ovn/utilities/ovn-nbctl.c
+++ b/ovn/utilities/ovn-nbctl.c
@@ -622,7 +622,12 @@ print_ls(const struct nbrec_logical_switch *ls, struct ds 
*s)
         if (lsp->n_tag) {
             ds_put_format(s, "        tag: %"PRIu64"\n", lsp->tag[0]);
         }
-        if (lsp->n_addresses) {
+
+        /* Print the addresses, but not if there's just a single "router"
+         * address because that's just clutter. */
+        if (lsp->n_addresses
+            && !(lsp->n_addresses == 1
+                 && !strcmp(lsp->addresses[0], "router"))) {
             ds_put_cstr(s, "        addresses: [");
             for (size_t j = 0; j < lsp->n_addresses; j++) {
                 ds_put_format(s, "%s\"%s\"",
-- 
2.10.2

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to