From 4aac303da6286d4bc08064e70369fb1493a480a2 Mon Sep 17 00:00:00 2001 From: John Fastabend Date: Wed, 6 Apr 2011 08:48:45 -0700 Subject: [PATCH 49/51] lldpad: dcbx, dropped ifdown messages breaks module Because link events can occasionally be lost we have made the lldpad core handle this case assuming the modules will initialize correctly when the ifup() routine is called even when the corresponding ifdown() was not. The dcbx module however was broke in this case and the result was an uninitialized port. This patch fixes this by moving the goto up the routine to initialize the interface even if ifdown was skipped. Signed-off-by: John Fastabend Signed-off-by: Petr Sabata --- lldp_dcbx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lldp_dcbx.c b/lldp_dcbx.c index 3f6197b..8aa0000 100644 --- a/lldp_dcbx.c +++ b/lldp_dcbx.c @@ -503,6 +503,7 @@ void dcbx_ifup(char *ifname) tlvs->dcbx_st = gdcbx_subtype; LIST_INSERT_HEAD(&dud->head, tlvs, entry); +initialized: dcbx_add_adapter(ifname); /* ensure advertise bits are set consistently with enabletx */ enabletx = is_tlv_txenabled(ifname, (OUI_CEE_DCBX << 8) | @@ -511,7 +512,6 @@ void dcbx_ifup(char *ifname) dont_advertise_dcbx_all(ifname); dcbx_bld_tlv(port); -initialized: if (get_operstate(ifname) == IF_OPER_UP) set_hw_all(ifname); -- 1.7.4.4