aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/cdp/cdp_input.c4
-rw-r--r--test/test_cdp.py3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/cdp/cdp_input.c b/src/plugins/cdp/cdp_input.c
index a27113d18eb..946aaf7f845 100644
--- a/src/plugins/cdp/cdp_input.c
+++ b/src/plugins/cdp/cdp_input.c
@@ -437,7 +437,7 @@ format_cdp_neighbors (u8 * s, va_list * va)
vnet_hw_interface_t *hw;
s = format (s,
- "%=25s %=15s %=25s %=10s\n",
+ "%=25s %=25s %=25s %=10s\n",
"Our Port", "Peer System", "Peer Port", "Last Heard");
/* *INDENT-OFF* */
@@ -446,7 +446,7 @@ format_cdp_neighbors (u8 * s, va_list * va)
hw = vnet_get_sup_hw_interface (vnm, n->sw_if_index);
if (n->disabled == 0)
- s = format (s, "%=25s %=15s %=25s %=10.1f\n",
+ s = format (s, "%=25s %=25s %=25s %=10.1f\n",
hw->name, n->device_name, n->port_id,
n->last_heard);
}));
diff --git a/test/test_cdp.py b/test/test_cdp.py
index ac42bf084a2..e8ced7cb796 100644
--- a/test/test_cdp.py
+++ b/test/test_cdp.py
@@ -86,9 +86,10 @@ class TestCDP(VppTestCase):
self.assertTrue(neighbors, "CDP didn't register neighbor")
port, system = neighbors[0]
+ length = min(len(system), len(self.device_id))
self.assert_equal(port, self.port_id, "CDP received invalid port id")
- self.assert_equal(system, self.device_id,
+ self.assert_equal(system[:length], self.device_id[:length],
"CDP received invalid device id")
def test_cdp_underflow_tlv(self):