summaryrefslogtreecommitdiff
path: root/print-ldp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-10-08 18:43:22 -0700
committerGuy Harris <guy@alum.mit.edu>2016-10-08 18:43:22 -0700
commit43587bee2e4f23249bfbe51e9025b94973d77ce3 (patch)
tree3925a8302f50a9f885a1468127c4a2697e59a0cd /print-ldp.c
parent9178fd8a959af7e6e5fb3a9d4cc23c76598e721e (diff)
downloadtcpdump-43587bee2e4f23249bfbe51e9025b94973d77ce3.tar.gz
Fix some names for MPLS PW types, and use that table for LDP.
Diffstat (limited to 'print-ldp.c')
-rw-r--r--print-ldp.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/print-ldp.c b/print-ldp.c
index 68149bba..40c9d8c2 100644
--- a/print-ldp.c
+++ b/print-ldp.c
@@ -380,16 +380,20 @@ ldp_tlv_print(netdissect_options *ndo,
break;
case LDP_FEC_MARTINI_VC:
/*
+ * We assume the type was supposed to be one of the MPLS
+ * Pseudowire Types.
+ */
+ TLV_TCHECK(7);
+ vc_info_len = *(tptr+2);
+
+ /*
* According to RFC 4908, the VC info Length field can be zero,
* in which case not only are there no interface parameters,
* there's no VC ID.
*/
- TLV_TCHECK(7);
- vc_info_len = *(tptr+2);
-
if (vc_info_len == 0) {
ND_PRINT((ndo, ": %s, %scontrol word, group-ID %u, VC-info-length: %u",
- tok2str(l2vpn_encaps_values, "Unknown", EXTRACT_16BITS(tptr)&0x7fff),
+ tok2str(mpls_pw_types_values, "Unknown", EXTRACT_16BITS(tptr)&0x7fff),
EXTRACT_16BITS(tptr)&0x8000 ? "" : "no ",
EXTRACT_32BITS(tptr+3),
vc_info_len));
@@ -399,7 +403,7 @@ ldp_tlv_print(netdissect_options *ndo,
/* Make sure we have the VC ID as well */
TLV_TCHECK(11);
ND_PRINT((ndo, ": %s, %scontrol word, group-ID %u, VC-ID %u, VC-info-length: %u",
- tok2str(l2vpn_encaps_values, "Unknown", EXTRACT_16BITS(tptr)&0x7fff),
+ tok2str(mpls_pw_types_values, "Unknown", EXTRACT_16BITS(tptr)&0x7fff),
EXTRACT_16BITS(tptr)&0x8000 ? "" : "no ",
EXTRACT_32BITS(tptr+3),
EXTRACT_32BITS(tptr+7),