diff options
author | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2013-12-23 11:38:38 +0000 |
---|---|---|
committer | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2013-12-23 11:38:38 +0000 |
commit | 27409e8f2eee299b61ae3acd085088b4e5a151be (patch) | |
tree | 66f2a7077f1094cec067f059a23855a778876900 | |
parent | 2f2b05aee2f624670fc2cf9ac10d65f782408e5f (diff) |
Use preference variable that wasn't used yet to pacify buildbot
svn path=/trunk/; revision=54378
-rw-r--r-- | epan/dissectors/packet-pdcp-lte.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c index 9ea33fe2f7..a0277c27f6 100644 --- a/epan/dissectors/packet-pdcp-lte.c +++ b/epan/dissectors/packet-pdcp-lte.c @@ -1404,6 +1404,23 @@ static tvbuff_t *decipher_payload(tvbuff_t *tvb, packet_info *pinfo _U_, int *of } #endif +#ifdef HAVE_LIBGCRYPT +static guint32 calculate_digest(gboolean *calculated) +{ + *calculated = FALSE; + return 0; +} +#else +static guint32 calculate_digest(gboolean *calculated) +{ + *calculated = FALSE; + return 0; +} +#endif + + + + /******************************/ /* Main dissection function. */ @@ -1424,6 +1441,8 @@ static void dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree tvbuff_t *payload_tvb; pdu_security_settings_t pdu_security_settings; gboolean payload_deciphered = FALSE; + guint32 calculated_digest; + gboolean digest_was_calculated = FALSE; /* Initialise security settings */ pdu_security_settings.valid = FALSE; @@ -1755,6 +1774,10 @@ static void dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree further dissectors on payload */ payload_tvb = decipher_payload(tvb, pinfo, &offset, &pdu_security_settings, p_pdcp_info->plane, &payload_deciphered); + if (global_pdcp_check_integrity) { + calculated_digest = calculate_digest(&digest_was_calculated); + } + if (p_pdcp_info->plane == SIGNALING_PLANE) { guint32 data_length; guint32 mac; @@ -1810,6 +1833,10 @@ static void dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree proto_tree_add_item(pdcp_tree, hf_pdcp_lte_mac, payload_tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; + if (calculated_digest) { + /* TODO: compare with what was found */ + } + col_append_fstr(pinfo->cinfo, COL_INFO, " MAC=0x%08x (%u bytes data)", mac, data_length); } |