From 8ee44ed1df687e293a7eb0c86191219d2543105d Mon Sep 17 00:00:00 2001 From: Jens Osterkamp Date: Thu, 3 Feb 2011 23:00:03 +0000 Subject: [PATCH 02/51] bugfix: set configured capabilities as well So far the configured capabilities have not been set during exchange of EVB TLVs. This fixes it. Signed-off-by: Jens Osterkamp Signed-off-by: Petr Sabata --- lldp_evb.c | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lldp_evb.c b/lldp_evb.c index 4f50f31..8533b31 100644 --- a/lldp_evb.c +++ b/lldp_evb.c @@ -388,17 +388,23 @@ int evb_check_and_fill(struct evb_data *ed, struct tlv_info_evb *tie) ed->tie->smode = LLDP_EVB_CAPABILITY_FORWARD_STANDARD; } - /* If both sides support RTE, set it */ - if ((tie->scap & ed->policy->scap) & LLDP_EVB_CAPABILITY_PROTOCOL_RTE) + /* If both sides support RTE, support and configure it */ + if ((tie->scap & ed->policy->scap) & LLDP_EVB_CAPABILITY_PROTOCOL_RTE) { ed->tie->scap |= LLDP_EVB_CAPABILITY_PROTOCOL_RTE; + ed->tie->ccap |= LLDP_EVB_CAPABILITY_PROTOCOL_RTE; + } /* If both sides support ECP, set it */ - if ((tie->scap & ed->policy->scap) & LLDP_EVB_CAPABILITY_PROTOCOL_ECP) + if ((tie->scap & ed->policy->scap) & LLDP_EVB_CAPABILITY_PROTOCOL_ECP) { ed->tie->scap |= LLDP_EVB_CAPABILITY_PROTOCOL_ECP; + ed->tie->ccap |= LLDP_EVB_CAPABILITY_PROTOCOL_ECP; + } /* If both sides support VDP, set it */ - if ((tie->scap & ed->policy->scap) & LLDP_EVB_CAPABILITY_PROTOCOL_VDP) + if ((tie->scap & ed->policy->scap) & LLDP_EVB_CAPABILITY_PROTOCOL_VDP) { ed->tie->scap |= LLDP_EVB_CAPABILITY_PROTOCOL_VDP; + ed->tie->ccap |= LLDP_EVB_CAPABILITY_PROTOCOL_VDP; + } /* If supported caps include VDP take over min value of both */ if (ed->tie->scap & LLDP_EVB_CAPABILITY_PROTOCOL_VDP) -- 1.7.4.4