aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cdp/cdp_input.c
AgeCommit message (Collapse)AuthorFilesLines
2019-05-29Start the cdp period process on demandDave Barach1-3/+0
Change-Id: I219b270f905dad5939ab38e933712845c314286d Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-16init / exit function orderingDave Barach1-5/+6
The vlib init function subsystem now supports a mix of procedural and formally-specified ordering constraints. We should eliminate procedural knowledge wherever possible. The following schemes are *roughly* equivalent: static clib_error_t *init_runs_first (vlib_main_t *vm) { clib_error_t *error; ... do some stuff... if ((error = vlib_call_init_function (init_runs_next))) return error; ... } VLIB_INIT_FUNCTION (init_runs_first); and static clib_error_t *init_runs_first (vlib_main_t *vm) { ... do some stuff... } VLIB_INIT_FUNCTION (init_runs_first) = { .runs_before = VLIB_INITS("init_runs_next"), }; The first form will [most likely] call "init_runs_next" on the spot. The second form means that "init_runs_first" runs before "init_runs_next," possibly much earlier in the sequence. Please DO NOT construct sets of init functions where A before B actually means A *right before* B. It's not necessary - simply combine A and B - and it leads to hugely annoying debugging exercises when trying to switch from ad-hoc procedural ordering constraints to formal ordering constraints. Change-Id: I5e4353503bf43b4acb11a45fb33c79a5ade8426c Signed-off-by: Dave Barach <dave@barachs.net>
2018-12-12Fix CDP failure in make testLijian.Zhang1-2/+2
Once the hostname is longer than 15 bytes, the name of device in the output of show cdp command will be truncated, and CDP test case will fail with below message. ============================================================================== FAIL: test_send_cdp_packet (test_cdp.TestCDP) ------------------------------------------------------------------------------ Traceback (most recent call last): File "vpp/test/test_cdp.py", line 92, in test_send_cdp_packet "CDP received invalid device id") File "vpp/test/framework.py", line 804, in assert_equal self.assertEqual(real_value, expected_value, msg) AssertionError: Invalid CDP received invalid device id: net-x86-supermi does not match expected value net-x86-supermicro-02 Change-Id: Ia32b92c6cd1bb6070adcee3ec45e38399ec382a7 Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
2018-11-06VPP-1481: fixed tlv length checking & added testsFilip Varga1-2/+10
Change-Id: I9375bca5f5136c84d801dbd635929bb1c37d75b4 Signed-off-by: Filip Varga <filip.varga@pantheon.tech>
2018-10-23c11 safe string handling supportDave Barach1-1/+1
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-22VPP-1420 CDP check memory bounds fixFilip Varga1-4/+17
Change-Id: I7951ffd050acb618dd20b86ae5946e1228ff5d79 Signed-off-by: Filip Varga <fivarga@cisco.com>
2018-09-16Register cdp_input when enabled for the first timeDave Barach1-7/+12
Graceful handling of unknown tlv types Change-Id: Idbc9ed524fc8b865c8e12571813cc73548bde480 Signed-off-by: Dave Barach <dave@barachs.net>
2018-03-10Move the vnet cdp protocol implementation to a pluginDave Barach1-0/+504
Add a binary API and debug cli to enable/disable cdp. cdp is disabled by default. Change-Id: I307c7e38dfda38e36ff3325f65de7036c34d89b1 Signed-off-by: Dave Barach <dave@barachs.net>