ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] Calling the NR-MAC dissector

Date: Thu, 18 Jul 2019 22:02:15 +0200
Hey,

I am trying to use the MAC-NR dissector with a PCAP that capsules the
PDUs in UDP frames. It wasn't working out of the box but looking into
the code it seems the heuristic isn't enabled by default. The attached
trivial patch fixes the issue and Wireshark can dissect NR PDUs within
UDP packets. Any reason why this isn't enabled by default? What's the
preferred way to create and analyze NR captures?

Cheers
Andre
diff --git a/epan/dissectors/packet-mac-nr.c b/epan/dissectors/packet-mac-nr.c
index b9678448ac..7dc242aaf9 100644
--- a/epan/dissectors/packet-mac-nr.c
+++ b/epan/dissectors/packet-mac-nr.c
@@ -4505,7 +4505,7 @@ void proto_register_mac_nr(void)
 void proto_reg_handoff_mac_nr(void)
 {
     /* Add as a heuristic UDP dissector */
-    heur_dissector_add("udp", dissect_mac_nr_heur, "MAC-NR over UDP", "mac_nr_udp", proto_mac_nr, HEURISTIC_DISABLE);
+    heur_dissector_add("udp", dissect_mac_nr_heur, "MAC-NR over UDP", "mac_nr_udp", proto_mac_nr, HEURISTIC_ENABLE);
 
     rlc_nr_handle = find_dissector_add_dependency("rlc-nr", proto_mac_nr);
     nr_rrc_bcch_bch_handle = find_dissector_add_dependency("nr-rrc.bcch.bch", proto_mac_nr);