Merge pull request #15948 from SimonWalton-HiFi/dissectors-nonverified-packets

Packet dissectors: Don't read HMAC for 'nonverified' packets
This commit is contained in:
Shannon Romano 2019-07-23 12:07:56 -07:00 committed by GitHub
commit 9f2d997dbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -167,6 +167,19 @@ local unsourced_packet_types = {
["ICEServerHeartbeatACK"] = true
}
local nonverified_packet_types = {
["NodeJsonStats"] = true,
["EntityQuery"] = true,
["OctreeDataNack"] = true,
["EntityEditNack"] = true,
["DomainListRequest"] = true,
["StopNode"] = true,
["DomainDisconnectRequest"] = true,
["UsernameFromIDRequest"] = true,
["NodeKickRequest"] = true,
["NodeMuteRequest"] = true,
}
local fragments = {}
local RFC_5389_MAGIC_COOKIE = 0x2112A442
@ -304,9 +317,11 @@ function p_hfudt.dissector(buf, pinfo, tree)
subtree:add_le(f_sender_id, sender_id)
i = i + 2
-- read HMAC MD5 hash
subtree:add(f_hmac_hash, buf(i, 16))
i = i + 16
if nonverified_packet_types[packet_type_text] == nil then
-- read HMAC MD5 hash
subtree:add(f_hmac_hash, buf(i, 16))
i = i + 16
end
end
local payload_to_dissect = nil