diff options
author | Jorge Mora <jmora1300@gmail.com> | 2021-08-25 14:15:39 -0600 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-08-31 08:14:31 +0000 |
commit | 981ec7f3c7740c4b41eb072be0408c1df870dc05 (patch) | |
tree | e801a54af8bfe7af399b27a0fc28e542d61d5541 /epan/dissectors/packet-rpc.c | |
parent | e446bbc3e725fbe4c4ba392065be646a64ae45c5 (diff) |
iwarp_mpa: fix iWarp MPA for NFS-over-RDMA
On the first packet of the conversation, the MPA layer is
dissected correctly followed by the DDP, RDMAP, RPC-over-RDMA,
RPC and NFS layers. The MPA layer sets the TCP conversation as
MPA protocol but when it dissects the RPC layer it also sets
the TCP conversation as RPC protocol thus overwriting the previous
protocol.
Added new port type PT_IWARP_MPA so that when the RPC layer
is dissected it does not overwrite the default protocol for
the TCP conversation which has already been set to MPA.
Fixes #15869.
Diffstat (limited to 'epan/dissectors/packet-rpc.c')
-rw-r--r-- | epan/dissectors/packet-rpc.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/epan/dissectors/packet-rpc.c b/epan/dissectors/packet-rpc.c index 4b406b8707..9155a663ba 100644 --- a/epan/dissectors/packet-rpc.c +++ b/epan/dissectors/packet-rpc.c @@ -1677,7 +1677,7 @@ get_conversation_for_call(packet_info *pinfo) * might send retransmissions from a different port from * the original request. */ - if (pinfo->ptype == PT_TCP || pinfo->ptype == PT_IBQP) { + if (pinfo->ptype == PT_TCP || pinfo->ptype == PT_IBQP || pinfo->ptype == PT_IWARP_MPA) { conversation = find_conversation_pinfo(pinfo, 0); } else { /* @@ -1691,7 +1691,7 @@ get_conversation_for_call(packet_info *pinfo) } if (conversation == NULL) { - if (pinfo->ptype == PT_TCP || pinfo->ptype == PT_IBQP) { + if (pinfo->ptype == PT_TCP || pinfo->ptype == PT_IBQP || pinfo->ptype == PT_IWARP_MPA) { conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); @@ -1729,7 +1729,7 @@ find_conversation_for_reply(packet_info *pinfo) * to the original call and a retransmission of the call * might be sent to different ports. */ - if (pinfo->ptype == PT_TCP || pinfo->ptype == PT_IBQP) { + if (pinfo->ptype == PT_TCP || pinfo->ptype == PT_IBQP || pinfo->ptype == PT_IWARP_MPA) { conversation = find_conversation_pinfo(pinfo, 0); } else { /* @@ -1761,6 +1761,11 @@ new_conversation_for_reply(packet_info *pinfo) &pinfo->src, &pinfo->dst, ENDPOINT_IBQP, pinfo->srcport, pinfo->destport, 0); break; + case PT_IWARP_MPA: + conversation = conversation_new(pinfo->num, + &pinfo->src, &pinfo->dst, ENDPOINT_IWARP_MPA, + pinfo->srcport, pinfo->destport, 0); + break; default: conversation = conversation_new(pinfo->num, &pinfo->dst, &null_address, conversation_pt_to_endpoint_type(pinfo->ptype), @@ -2147,7 +2152,7 @@ looks_like_rpc_reply(tvbuff_t *tvb, packet_info *pinfo, int offset) * and this is a connection-oriented transport, * give up. */ - if (((! rpc_find_fragment_start) || (pinfo->ptype != PT_TCP)) && (pinfo->ptype != PT_IBQP)) { + if (((! rpc_find_fragment_start) || (pinfo->ptype != PT_TCP)) && (pinfo->ptype != PT_IBQP) && (pinfo->ptype != PT_IWARP_MPA)) { return NULL; } |