diff options
| author | Gordon Tetlow <gordon@FreeBSD.org> | 2017-09-18 04:10:54 +0000 |
|---|---|---|
| committer | Gordon Tetlow <gordon@FreeBSD.org> | 2017-09-18 04:10:54 +0000 |
| commit | 4533b6d8a9b95fc043b72b3656b98e79ac839041 (patch) | |
| tree | 4ac156eafa4323886af859c09363dff43cc44106 /print-stp.c | |
| parent | d79b843cb78484ea27f877f1541055e1a6a5a4d3 (diff) | |
Diffstat (limited to 'print-stp.c')
| -rw-r--r-- | print-stp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/print-stp.c b/print-stp.c index 2f5c9175acf5..ee0627ca88be 100644 --- a/print-stp.c +++ b/print-stp.c @@ -256,6 +256,7 @@ stp_print_mstp_bpdu(netdissect_options *ndo, const struct stp_bpdu_ *stp_bpdu, return 1; } + ND_TCHECK(stp_bpdu->flags); ND_PRINT((ndo, "\n\tport-role %s, ", tok2str(rstp_obj_port_role_values, "Unknown", RSTP_EXTRACT_PORT_ROLE(stp_bpdu->flags)))); @@ -475,6 +476,7 @@ stp_print(netdissect_options *ndo, const u_char *p, u_int length) if (stp_bpdu->protocol_version == STP_PROTO_SPB) { /* Validate v4 length */ + ND_TCHECK_16BITS(p + MST_BPDU_VER3_LEN_OFFSET + mstp_len); spb_len = EXTRACT_16BITS (p + MST_BPDU_VER3_LEN_OFFSET + mstp_len); spb_len += 2; if (length < (sizeof(struct stp_bpdu_) + mstp_len + spb_len) || |
