SNMP/UDP: SNMP is walking on UDP conversation/stream ID

This commit is contained in:
Chuck Craft 2022-12-15 17:35:48 -06:00 committed by AndersBroman
parent b0cf030b30
commit 3a61e3f851
2 changed files with 4 additions and 2 deletions

View File

@ -92,6 +92,7 @@ typedef enum {
CONVERSATION_MCTP,
CONVERSATION_NVME_MI, /* NVMe management interface */
CONVERSATION_BP, /* Bundle Protocol endpoint IDs */
CONVERSATION_SNMP, /* SNMP */
} conversation_type;
/*
@ -138,6 +139,7 @@ typedef enum {
#define ENDPOINT_LOG CONVERSATION_LOG
#define ENDPOINT_MCTP CONVERSATION_MCTP
#define ENDPOINT_NVME_MI CONVERSATION_NVME_MI
#define ENDPOINT_SNMP CONVERSATION_SNMP
typedef conversation_type endpoint_type;

View File

@ -3120,11 +3120,11 @@ snmp_find_conversation_and_get_conv_data(packet_info *pinfo) {
conversation_t *conversation;
snmp_conv_info_t *snmp_info = NULL;
conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype),
conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, CONVERSATION_SNMP,
pinfo->srcport, pinfo->destport, 0);
if( (conversation == NULL) || (conversation_get_dissector(conversation, pinfo->num)!=snmp_handle) ) {
conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype),
conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_SNMP,
pinfo->srcport, pinfo->destport, 0);
conversation_set_dissector(conversation, snmp_handle);
}