From 4e3942eb31db5a02f967de0b72408dc07bbb8075 Mon Sep 17 00:00:00 2001 From: Jack Yu Date: Tue, 21 May 2024 15:14:56 -0700 Subject: [PATCH] Apply patch to fix aww.proto registration in WS dissector --- 00-cpp_compat.patch | 4 ++-- 01-radio_bearer_config.patch | 25 +++++++++++++++++++++++++ mobileinsight.def | 5 ++++- 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 01-radio_bearer_config.patch diff --git a/00-cpp_compat.patch b/00-cpp_compat.patch index 52818c4..1060f11 100644 --- a/00-cpp_compat.patch +++ b/00-cpp_compat.patch @@ -1,5 +1,5 @@ ---- epan.h.old 2024-04-20 00:34:15.534364916 -0700 -+++ epan.h 2024-04-20 00:34:25.094467480 -0700 +--- a/epan/epan.h 2024-04-20 00:34:15.534364916 -0700 ++++ b/epan/epan.h 2024-04-20 00:34:25.094467480 -0700 @@ -10,9 +10,6 @@ #ifndef __EPAN_H__ #define __EPAN_H__ diff --git a/01-radio_bearer_config.patch b/01-radio_bearer_config.patch new file mode 100644 index 0000000..b3444a4 --- /dev/null +++ b/01-radio_bearer_config.patch @@ -0,0 +1,25 @@ +diff --git a/epan/dissectors/asn1/nr-rrc/nr-rrc.cnf b/epan/dissectors/asn1/nr-rrc/nr-rrc.cnf +index fd478d8969..b3b89250e0 100644 +--- a/epan/dissectors/asn1/nr-rrc/nr-rrc.cnf ++++ b/epan/dissectors/asn1/nr-rrc/nr-rrc.cnf +@@ -145,7 +145,7 @@ PH-TypeListMCG + PH-TypeListSCG + RA-ReportList-r16 + RACH-ConfigCommon +-RadioBearerConfig ++RadioBearerConfig @radio_bearer_conf + ReferenceTime-r16 + RRCReconfiguration @rrc_reconf + RRCReconfigurationComplete +diff --git a/epan/dissectors/packet-nr-rrc.c b/epan/dissectors/packet-nr-rrc.c +index 75977474c0..cfa8602711 100644 +--- a/epan/dissectors/packet-nr-rrc.c ++++ b/epan/dissectors/packet-nr-rrc.c +@@ -112214,6 +112214,7 @@ proto_register_nr_rrc(void) { + register_dissector("nr-rrc.ue_nr_cap", dissect_nr_rrc_UE_NR_Capability_PDU, proto_nr_rrc); + register_dissector("nr-rrc.sbcch.sl.bch", dissect_SBCCH_SL_BCH_Message_PDU, proto_nr_rrc); + register_dissector("nr-rrc.scch", dissect_SCCH_Message_PDU, proto_nr_rrc); ++ register_dissector("nr-rrc.radio_bearer_conf", dissect_nr_rrc_RadioBearerConfig_PDU, proto_nr_rrc); + + + /*--- End of included file: packet-nr-rrc-dis-reg.c ---*/ diff --git a/mobileinsight.def b/mobileinsight.def index a1eaa28..810c4ab 100644 --- a/mobileinsight.def +++ b/mobileinsight.def @@ -8,6 +8,7 @@ From: ubuntu:22.04 %files 00-cpp_compat.patch /build/00-cpp_compat.patch + 01-radio_bearer_config.patch /build/01-radio_bearer_config.patch %post # Update and install dependencies @@ -53,7 +54,9 @@ From: ubuntu:22.04 # Compile and install wireshark cd "/build/wireshark-{{ WS_VER }}" - patch epan/epan.h < /build/00-cpp_compat.patch + for patch in /build/*.patch; do + patch -p1 < "$patch" + done cmake -DBUILD_wireshark=OFF . make -j "{{ NUM_THREADS }}" make install