There was a bug in the print function for EVB TLVs that would cause the wrong values to be printed. This patch corrects it and adds some debug statement to evb_print_cfg_tlv. Signed-off-by: Jens Osterkamp <jens@xxxxxxxxxxxxxxxxxx> --- lldp_evb_clif.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lldp_evb_clif.c b/lldp_evb_clif.c index d1773fe..d450f4b 100644 --- a/lldp_evb_clif.c +++ b/lldp_evb_clif.c @@ -108,7 +108,7 @@ void evb_print_cfg_tlv(u16 len, char *info) } if (!hexstr2bin(info, &smode, sizeof(smode))) { - printf("supported forwarding mode:"); + printf("supported forwarding mode: (0x%02hhx)", smode); if (smode & LLDP_EVB_CAPABILITY_FORWARD_RELAXEDRELAY) printf(" reflective relay"); @@ -122,7 +122,7 @@ void evb_print_cfg_tlv(u16 len, char *info) } if (!hexstr2bin(info+2, &scap, sizeof(scap))) { - printf("\tsupported capabilities:"); + printf("\tsupported capabilities: (0x%02hhx)", scap); if ( scap & LLDP_EVB_CAPABILITY_PROTOCOL_RTE) printf(" RTE"); @@ -141,8 +141,8 @@ void evb_print_cfg_tlv(u16 len, char *info) printf("Unable to decode scap !\n"); } - if (!hexstr2bin(info, &cmode, sizeof(cmode))) { - printf("\tconfigured forwarding mode:"); + if (!hexstr2bin(info+4, &cmode, sizeof(cmode))) { + printf("\tconfigured forwarding mode: (0x%02hhx)", cmode); if (cmode & LLDP_EVB_CAPABILITY_FORWARD_RELAXEDRELAY) printf(" reflective relay"); @@ -155,8 +155,8 @@ void evb_print_cfg_tlv(u16 len, char *info) printf("Unable to decode cmode !\n"); } - if (!hexstr2bin(info+4, &ccap, sizeof(ccap))) { - printf("\tconfigured capabilities:"); + if (!hexstr2bin(info+6, &ccap, sizeof(ccap))) { + printf("\tconfigured capabilities: (0x%02hhx)", ccap); if ( ccap & LLDP_EVB_CAPABILITY_PROTOCOL_RTE) printf(" RTE"); -- 1.7.1 _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/virtualization