From b62545fac8f28c63460e4e932a526280884d0200 Mon Sep 17 00:00:00 2001 From: John Fastabend Date: Tue, 12 Jul 2011 09:21:21 -0700 Subject: [PATCH 05/29] lldpad: 802.1Qaz PFC TLV incorrectly sets willing, cap, and mac bits The willing, capabilities and MACSec enabled bits are incorrectly set to peer's value in the PFC TLV. Signed-off-by: John Fastabend Signed-off-by: Petr Sabata --- lldp_8021qaz.c | 15 ++++++--------- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git a/lldp_8021qaz.c b/lldp_8021qaz.c index c146d4a..adeb0eb 100644 --- a/lldp_8021qaz.c +++ b/lldp_8021qaz.c @@ -1192,17 +1192,14 @@ bld_ieee8021qaz_pfc_tlv(struct ieee8021qaz_tlvs *tlvs) hton24(pfc->oui, OUI_IEEE_8021); pfc->subtype = LLDP_8021QAZ_PFC; - if (tlvs->pfc->current_state == INIT) { - pfc->wmrc = tlvs->pfc->local.willing << 7 | - tlvs->pfc->local.mbc << 6 | - tlvs->pfc->local.pfc_cap; + pfc->wmrc = tlvs->pfc->local.willing << 7 | + tlvs->pfc->local.mbc << 6 | + tlvs->pfc->local.pfc_cap; + + if (tlvs->pfc->current_state == INIT) pfc->pfc_enable = tlvs->pfc->local.pfc_enable; - } else { - pfc->wmrc = tlvs->pfc->remote.willing << 7 | - tlvs->pfc->remote.mbc << 6 | - tlvs->pfc->remote.pfc_cap; + else pfc->pfc_enable = tlvs->pfc->remote.pfc_enable; - } tlv->type = ORG_SPECIFIC_TLV; tlv->length = sizeof(struct ieee8021qaz_tlv_pfc); -- 1.7.6