aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/snmp/packet-snmp-template.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/asn1/snmp/packet-snmp-template.c')
-rw-r--r--epan/dissectors/asn1/snmp/packet-snmp-template.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/asn1/snmp/packet-snmp-template.c b/epan/dissectors/asn1/snmp/packet-snmp-template.c
index a10b26415d..3b3cfb70a1 100644
--- a/epan/dissectors/asn1/snmp/packet-snmp-template.c
+++ b/epan/dissectors/asn1/snmp/packet-snmp-template.c
@@ -2579,9 +2579,7 @@ void proto_register_snmp(void) {
void proto_reg_handoff_snmp(void) {
dissector_handle_t snmp_tcp_handle;
- dissector_add_uint("udp.port", UDP_PORT_SNMP, snmp_handle);
- dissector_add_uint("udp.port", UDP_PORT_SNMP_TRAP, snmp_handle);
- dissector_add_uint("udp.port", UDP_PORT_SNMP_PATROL, snmp_handle);
+ dissector_add_uint_with_preference("udp.port", UDP_PORT_SNMP, snmp_handle);
dissector_add_uint("ethertype", ETHERTYPE_SNMP, snmp_handle);
dissector_add_uint("ipx.socket", IPX_SOCKET_SNMP_AGENT, snmp_handle);
dissector_add_uint("ipx.socket", IPX_SOCKET_SNMP_SINK, snmp_handle);
@@ -2593,6 +2591,8 @@ void proto_reg_handoff_snmp(void) {
the "trap" port doesn't really need a separate preference. Just register
normally */
dissector_add_uint("tcp.port", TCP_PORT_SNMP_TRAP, snmp_tcp_handle);
+ dissector_add_uint("udp.port", UDP_PORT_SNMP_TRAP, snmp_handle);
+ dissector_add_uint("udp.port", UDP_PORT_SNMP_PATROL, snmp_handle);
data_handle = find_dissector("data");