monitor: Add an OBEX protocol decoder to btmon
Subsystems (2)
cover monitor: Add an OBEX protocol decoder to btmon
From: Frédéric Danis <[email protected]>
btmon currently hexdumps all OBEX traffic (RFCOMM and L2CAP GOEP), making PBAP/MAP/BIP/OPP sessions hard to follow in a trace. This series adds a dedicated OBEX dissector (monitor/obex.c) and wires it into the RFCOMM, L2CAP and SDP monitors.
Patch 1 adds the core decoder: opcodes, response codes, CONNECT/SETPATH fixed fields, all generic header IDs, BIP's IMG-Handle/IMG-Descriptor extension headers, and Target/Who UUID recognition for the well known OBEX profiles.
It tracks sessions on both RFCOMM (learned from SDP ProtocolDescriptorList) and L2CAP (fixed PSM 0x1001 or a dynamically negotiated one learned from the GoepL2capPsm SDP attribute), keyed direction-independently so CONNECT requests and responses are correctly matched to the same session.
Patch 2 adds per-profile Application Parameters (Tag/Len/Value) decoding for PBAP, MAP and BIP, replacing the generic 'Tag 0xNN len N' hexdump with named, typed values, using the profile learned from each session's Target/Who header.
Patch 3 adds SDU reassembly for L2CAP ERTM/Streaming mode, since OBEX PDUs routinely span multiple SAR fragments; without it, any segmented PDU failed to parse ('frame too short'). Reassembled PDUs are decoded once, on the End fragment, while raw per-fragment hexdumps are kept for Start/Continuation fragments so no bytes are lost from the trace.
Sample decode, a PBAP CONNECT followed by a GET with Application Parameters:
OBEX: Connect (0x00) final 1 len 35
Version: 1.0
Flags: 0x00
Max Packet Length: 8087
Target: Phonebook Access (PBAP)
Application Parameters: [len 6]
Supported Features: 1023 (0x000003ff)
...
OBEX: Get (0x03) final 1 len 87
Connection ID: 1 (0x00000001)
Single Response Mode: 1 (0x01)
Name: telecom/fav.vcf
Type: x-bt/phonebook
Application Parameters: [len 21]
Format: 1 (0x01)
Max List Count: 65535 (0xffff)
Filter: 0x0000000018b111af
List Start Offset: 0 (0x0000)Frédéric Danis (4):
monitor: Strip trailing L2CAP FCS before upper layer dissectors
monitor: Add OBEX protocol decoder
monitor: Decode PBAP/MAP/BIP Application Parameters tags
monitor: Reassemble L2CAP ERTM/Streaming SAR fragments before
dissecting
Makefile.tools | 1 + monitor/l2cap.c | 246 +++++++- monitor/obex.c | 1390 ++++++++++++++++++++++++++++++++++++++++++++++ monitor/obex.h | 119 ++++ monitor/packet.c | 5 +- monitor/rfcomm.c | 20 +- monitor/sdp.c | 12 +- 7 files changed, 1768 insertions(+), 25 deletions(-) create mode 100644 monitor/obex.c create mode 100644 monitor/obex.h
Signature · 1 line
2.43.0
PATCH 1/4 monitor: Strip trailing L2CAP FCS before upper layer dissectors
From: Frédéric Danis <[email protected]>
ERTM/Streaming mode I-frames append a 2-byte FCS after the payload, which was never stripped before handing the frame to protocol dissectors (OBEX, RFCOMM, SDP, ...). OBEX's own PDU length enforcement was masking this as spurious "Trailing data" on every ERTM frame, two bytes that are actually the L2CAP checksum, not protocol payload.
Track the negotiated FCS option per channel (defaulting to the 16-bit FCS enabled by the Core Spec unless a peer explicitly negotiates "No FCS"), and trim the trailing 2 bytes off ERTM/Streaming mode frames before dispatching to the PSM-specific dissector.
Verified against a real btsnoop capture: the spurious 2-byte "Trailing data" hexdump after every OBEX PDU on an ERTM channel is gone, while decode output is otherwise unchanged (109 OBEX PDUs decoded before and after).
--- monitor/l2cap.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+)
monitor/l2cap.c +51 -0
@@ -100,6 +100,7 @@ struct chan_data {uint8_t ext_ctrl;uint8_t seq_num;uint16_t sdu; +uint8_t fcs;struct packet_latency tx_l; };
@@ -158,6 +159,12 @@ static void assign_scid(const struct l2cap_frame *frame, uint16_t scid, chan_list[n].ctrlid = ctrlid; chan_list[n].mode = mode; +/* 16-bit FCS is the default for ERTM/Streaming mode unless the +* peer explicitly negotiates "No FCS" via the FCS configuration +* option (see assign_fcs()). +*/ + chan_list[n].fcs =1 ; + chan_list[n].seq_num = seq_num; }
@@ -255,6 +262,37 @@ static void assign_mode(const struct l2cap_frame *frame, } } +/* Record whether the peer negotiated "No FCS" (0x00) or "16-bit FCS" +* (0x01) via the FCS configuration option, so the trailing 2-byte FCS +* on ERTM/Streaming mode frames can be stripped before handing the +* payload to upper layer dissectors. +*/ +static void assign_fcs (const struct l2cap_frame *frame, +uint8_t fcs,uint16_t dcid) +{ +int i; + +for (i =0 ; i <MAX_CHAN ; i++) { +if (chan_list[i].index != frame->index) +continue ; + +if (chan_list[i].handle != frame->handle) +continue ; + +if (frame->in) { +if (chan_list[i].scid == dcid) { + chan_list[i].fcs = fcs; +break ; + } + }else { +if (chan_list[i].dcid == dcid) { + chan_list[i].fcs = fcs; +break ; + } + } + } +} +static int get_chan_data_index (const struct l2cap_frame *frame) {int i;
@@ -882,6 +920,9 @@ static void print_config_options(const struct l2cap_frame *frame, get_le16(data + consumed + 9));break ;case 0x05 : +if (response) +assign_fcs (frame, data[consumed +2 ], cid); +switch (data[consumed +2 ]) {case 0x00 : str ="No FCS" ;
@@ -2740,6 +2781,16 @@ void l2cap_frame(uint16_t index, bool in, uint16_t handle, uint16_t cid, }display_printf ("\n" ); + +/* ERTM/Streaming mode frames carry a trailing 2-byte +* FCS (unless explicitly negotiated off via the FCS +* configuration option) that is not part of the +* upper layer payload. +*/ + chan =get_chan (&frame); +if (chan && chan->fcs && frame.size >=2 ) + frame.size -=2 ; +break ; }
Signature · 1 line
2.43.0
PATCH 2/4 monitor: Add OBEX protocol decoder
In reply to Frédéric DanisFrom: Frédéric Danis <[email protected]>
Add a dedicated OBEX dissector so btmon can decode OBEX traffic instead of hexdumping it. OBEX reaches btmon over two transports:
- RFCOMM, on a channel number only knowable by correlating the SDP service record that advertised it.
- L2CAP, on either the fixed PSM 0x1001 or a dynamically negotiated one (advertised in a service record via the GoepL2capPsm attribute, 0x0200, as used by MAP/PBAP/OPP), both GOEP-over-L2CAP used by MAP/PBAP/BIP.
monitor/obex.c tracks RFCOMM channel and L2CAP PSM to OBEX-profile mappings learned from SDP ProtocolDescriptorList/ServiceClassIDList attributes (via an obex_add_psm()/obex_psm() table keyed like the existing RFCOMM channel table by index/handle/psm, cleared on ACL disconnect), and decodes opcodes, response codes, CONNECT/SETPATH fixed fields, and all known header IDs (Unicode text, byte sequence, 1-byte and 4-byte headers), including a generic Tag/Len/Value walk for Application Parameters.
Sessions are keyed by l2cap_chan_key(), the direction-independent session key already used by sdp.c/avctp.c/avdtp.c, rather than the raw L2CAP CID (which is SCID from one peer's perspective and DCID from the other's), so a CONNECT request seen on one direction and its response seen on the other are correctly recognized as the same session and the response's fixed fields (OBEX version, flags, max packet length) are parsed instead of being mistaken for headers.
The OBEX CONNECT Target/Who headers carry a profile-specific UUID, distinct from the SDP service class UUID; a lookup table decodes the Target/Who values used by well known OBEX profiles - PBAP, FTP, MAP, BIP (AVRCP Cover Art) and IrMC/SyncML.
Basic Imaging Profile uses two extension header IDs not covered by the generic header table: IMG-Handle (0x30, Unicode text) and IMG-Descriptor (0x71, byte sequence containing an XML document). Both are added to the header table so they decode with a readable label instead of falling back to 'Unknown'; IMG-Descriptor is printed as plain text like Type, since it is always a UTF-8 XML string.
monitor/rfcomm.c dispatches UIH frames on a tracked OBEX channel to the new decoder instead of hexdumping them. monitor/l2cap.c dispatches both PSMs the same way. monitor/sdp.c feeds attribute responses (including continuation-reassembled ones) to the SDP scanner so RFCOMM channels and L2CAP PSMs can be learned; obex_sdp_scan() peels the outer Sequence wrapper(s) sdp.c's callers pass (and, for Service Search Attribute Response, one Sequence per matched service record) with obex_de_next() before handing each flat attribute list to obex_scan_attr_list(), mirroring how sdp.c's own print_attr_list()/print_attr_lists() unwrap the same buffer for display.
--- Makefile.tools | 1 + monitor/l2cap.c | 24 +- monitor/obex.c | 1042 ++++++++++++++++++++++++++++++++++++++++++++++ monitor/obex.h | 118 ++++++ monitor/packet.c | 5 +- monitor/rfcomm.c | 20 +- monitor/sdp.c | 12 +- 7 files changed, 1214 insertions(+), 8 deletions(-) create mode 100644 monitor/obex.c create mode 100644 monitor/obex.h
Makefile.tools +1 -0
@@ -49,6 +49,7 @@ monitor_btmon_SOURCES = monitor/main.c monitor/bt.h \ monitor/a2dp.h monitor/a2dp.c \ monitor/rfcomm.h monitor/rfcomm.c \ monitor/bnep.h monitor/bnep.c \ + monitor/obex.h monitor/obex.c \ monitor/hwdb.h monitor/hwdb.c \ monitor/keys.h monitor/keys.c \ monitor/analyze.h monitor/analyze.c \
monitor/l2cap.c +23 -1
@@ -35,6 +35,7 @@#include "rfcomm.h" #include "bnep.h" #include "att.h" +#include "obex.h" #define L2CAP_MODE_BASIC 0x00#define L2CAP_MODE_RETRANS 0x01
@@ -1241,6 +1242,19 @@ static void sig_disconn_req(const struct l2cap_frame *frame)print_cid ("Destination" , pdu->dcid);print_cid ("Source" , pdu->scid); + +/* The channel is being torn down; drop any OBEX request state +* tracked for it (e.g. PSM 0x1001) so a later reuse of the same +* CID isn't misdecoded. Resolve both endpoints to the same +* direction-independent session key used by obex_packet(), since +* the SCID/DCID values are direction specific. +*/ +obex_remove_session (frame->index, frame->handle, +l2cap_chan_key (frame->index, frame->in, frame->handle, +le16_to_cpu (pdu->scid))); +obex_remove_session (frame->index, frame->handle, +l2cap_chan_key (frame->index, !frame->in, frame->handle, +le16_to_cpu (pdu->dcid))); }static void sig_disconn_rsp (const struct l2cap_frame *frame)
@@ -2817,8 +2831,16 @@ void l2cap_frame(uint16_t index, bool in, uint16_t handle, uint16_t cid,case 0x0019 :avdtp_packet (&frame);break ; +case 0x1001 : +obex_packet (&frame,l2cap_chan_key (index, in, handle, + cid)); +break ;default : -packet_hexdump (data, size); +if (obex_psm (index, handle, frame.psm)) +obex_packet (&frame,l2cap_chan_key (index, in, + handle, cid)); +else +packet_hexdump (data, size);break ; }break ;
monitor/obex.c new file +1042 -0
1,042 lines not on this page · raw message
monitor/obex.h new file +118 -0
118 lines not on this page · raw message
monitor/packet.c +4 -1
@@ -47,6 +47,7 @@#include "keys.h" #include "packet.h" #include "l2cap.h" +#include "obex.h" #include "control.h" #include "vendor.h" #include "msft.h"
@@ -12311,8 +12312,10 @@ static void disconnect_complete_evt(struct timeval *tv, uint16_t index,print_handle (evt->handle);print_reason (evt->reason); -if (evt->status ==0x00 ) +if (evt->status ==0x00 ) {release_handle (le16_to_cpu (evt->handle)); +obex_disconnect_handle (index,le16_to_cpu (evt->handle)); + } } static void auth_complete_evt(struct timeval *tv, uint16_t index,
monitor/rfcomm.c +17 -3
@@ -31,6 +31,7 @@#include "keys.h" #include "sdp.h" #include "rfcomm.h" +#include "obex.h" static const char *cr_str[] = {"RSP" ,
@@ -390,8 +391,9 @@ static bool uih_frame(struct rfcomm_frame *rfcomm_frame, uint8_t indent)uint8_t credits;struct l2cap_frame *frame = &rfcomm_frame->l2cap_frame;struct rfcomm_lhdr *hdr = &rfcomm_frame->hdr; +uint8_t channel =RFCOMM_GET_CHANNEL (hdr->address); -if (!RFCOMM_GET_CHANNEL (hdr->address)) +if (!channel)return mcc_frame (rfcomm_frame, indent);/* fetching credits from UIH frame */
@@ -402,7 +404,11 @@ static bool uih_frame(struct rfcomm_frame *rfcomm_frame, uint8_t indent)print_field ("%*cCredits: %d" , indent,' ' , hdr->credits); } -packet_hexdump (frame->data, frame->size); +if (obex_channel (frame->index, frame->handle, channel,NULL )) +obex_packet (frame, channel); +else +packet_hexdump (frame->data, frame->size); +return true; }
@@ -494,9 +500,17 @@ void rfcomm_packet(const struct l2cap_frame *frame)print_rfcomm_hdr (&rfcomm_frame, indent);/* UIH frame */ -if (ctype ==0xef ) +if (ctype ==0xef ) {if (!uih_frame (&rfcomm_frame, indent)) goto fail; + }else if (ctype ==0x43 || ctype ==0x0f ) { +/* DISC or DM: the RFCOMM channel is being torn down, drop +* any OBEX state tracked for it so a later renegotiation +* of the same channel number isn't misdecoded. +*/ +obex_remove_channel (frame->index, frame->handle, +RFCOMM_GET_CHANNEL (hdr.address)); + }return ;
monitor/sdp.c +9 -3
@@ -29,6 +29,7 @@#include "display.h" #include "l2cap.h" #include "sdp.h" +#include "obex.h" #define MAX_TID 16#define MAX_CONT_SIZE 17
@@ -423,7 +424,8 @@ struct cont_data {static struct cont_data cont_list[MAX_CONT ]; -static void handle_continuation (struct tid_data *tid,bool nested, +static void handle_continuation (const struct l2cap_frame *frame, +struct tid_data *tid,bool nested,uint16_t bytes,const uint8_t *data,uint16_t size) {uint8_t *newdata;
@@ -437,6 +439,7 @@ static void handle_continuation(struct tid_data *tid, bool nested,if (tid->cont[0 ] ==0x00 && data[bytes] ==0x00 ) {decode_data_elements (0 ,2 , data, bytes, nested ? print_attr_lists : print_attr_list); +obex_sdp_scan (frame, data, bytes, nested);print_continuation (data + bytes, size - bytes);return ;
@@ -489,6 +492,8 @@ static void handle_continuation(struct tid_data *tid, bool nested,decode_data_elements (0 ,2 , cont_list[n].data, cont_list[n].size, nested ? print_attr_lists : print_attr_list); +obex_sdp_scan (frame, cont_list[n].data, cont_list[n].size, + nested);free (cont_list[n].data); cont_list[n].data =NULL ;
@@ -641,7 +646,7 @@ static void attr_rsp(const struct l2cap_frame *frame, struct tid_data *tid) bytes =common_rsp (frame, tid); -handle_continuation (tid, false, bytes, +handle_continuation (frame, tid, false, bytes, frame->data +2 , frame->size -2 );clear_tid (tid);
@@ -689,7 +694,8 @@ static void search_attr_rsp(const struct l2cap_frame *frame, bytes =common_rsp (frame, tid); -handle_continuation (tid, true, bytes, frame->data +2 , frame->size -2 ); +handle_continuation (frame, tid, true, bytes, frame->data +2 , + frame->size -2 );clear_tid (tid); }
Signature · 1 line
2.43.0
PATCH 3/4 monitor: Decode PBAP/MAP/BIP Application Parameters tags
In reply to Frédéric DanisFrom: Frédéric Danis <[email protected]>
Application Parameters (Tag/Len/Value) were only shown generically as 'Tag 0xNN len N' plus a hexdump, with no knowledge of what each tag means. Add per-profile tag tables (name + value type) for PBAP, MAP and BIP, sourced from their respective specifications, and decode known tag values as numbers/strings instead of a raw hexdump.
Since Application Parameters headers don't repeat which profile a session belongs to, remember the profile classification learned from a session's CONNECT Target/Who header (already decoded by the existing Target/Who profile lookup) in a small per-session table, keyed the same way as the existing last-request tracking. Sessions with no recognized Target/Who (or none yet seen) keep today's generic Tag/Len/Value dump.
--- monitor/obex.c | 323 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 310 insertions(+), 13 deletions(-)
monitor/obex.c +310 -13
@@ -45,6 +45,18 @@#define MAX_OBEX_CHAN 64#define MAX_OBEX_REQ 32 +/* Profiles with a known Application Parameters tag set, used to +* select the right tag table when decoding the Application Parameters +* header. OBEX_PROFILE_UNKNOWN falls back to a generic Tag/Len/Value +* dump. +*/ +enum obex_profile { +OBEX_PROFILE_UNKNOWN , +OBEX_PROFILE_PBAP , +OBEX_PROFILE_MAP , +OBEX_PROFILE_BIP , +}; +struct obex_chan_data {uint16_t index;uint16_t handle;
@@ -303,6 +315,69 @@ static bool obex_last_request_is(uint16_t index, uint16_t handle,return false; } +/* Profile classification (PBAP/MAP/BIP/unknown) of an ongoing OBEX +* session, learned from a CONNECT's Target/Who header and remembered +* per session so that later Application Parameters headers (which +* don't repeat the Target/Who UUID) can be decoded using the right +* profile-specific tag table. +*/ +#define MAX_OBEX_PROFILE 32 + +struct obex_profile_data { +uint16_t index; +uint16_t handle; +uint16_t channel; +enum obex_profile profile; +}; + +static struct obex_profile_data obex_profile_list[MAX_OBEX_PROFILE ]; + +static void obex_set_profile (uint16_t index,uint16_t handle, +uint16_t channel, +enum obex_profile profile) +{ +int i, n =-1 ; + +for (i =0 ; i <MAX_OBEX_PROFILE ; i++) { +if (obex_profile_list[i].handle ==0x0000 && n <0 ) { + n = i; +continue ; + } + +if (obex_profile_list[i].index == index && + obex_profile_list[i].handle == handle && + obex_profile_list[i].channel == channel) { + n = i; +break ; + } + } + +if (n <0 ) +return ; + + obex_profile_list[n].index = index; + obex_profile_list[n].handle = handle; + obex_profile_list[n].channel = channel; + obex_profile_list[n].profile = profile; +} + +static enum obex_profile obex_get_profile (uint16_t index,uint16_t handle, +uint16_t channel) +{ +int i; + +for (i =0 ; i <MAX_OBEX_PROFILE ; i++) { +if (obex_profile_list[i].handle != handle || + obex_profile_list[i].index != index || + obex_profile_list[i].channel != channel) +continue ; + +return obex_profile_list[i].profile; + } + +return OBEX_PROFILE_UNKNOWN ; +} +/* * Minimal SDP Data Element reader, mirroring monitor/sdp.c's * decode_data_elements() size/type decoding, but returning the decoded
@@ -739,24 +814,31 @@ static const struct {const uint8_t uuid[16 ];uint8_t len;const char *str; +enum obex_profile profile; } obex_target_table[] = { { { 0x79, 0x61, 0x35, 0xf0, 0xf0, 0xc5, 0x11, 0xd8, 0x09, 0x66, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 }, 16, - "Phonebook Access (PBAP)" }, + "Phonebook Access (PBAP)", + OBEX_PROFILE_PBAP }, { { 0xf9, 0xec, 0x7b, 0xc4, 0x95, 0x3c, 0x11, 0xd2, 0x98, 0x4e, 0x52, 0x54, 0x00, 0xdc, 0x9e, 0x09 }, 16, - "File Transfer (FTP)" }, + "File Transfer (FTP)", + OBEX_PROFILE_UNKNOWN }, { { 0xbb, 0x58, 0x2b, 0x40, 0x42, 0x0c, 0x11, 0xdb, 0xb0, 0xde, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 }, 16, - "Message Access (MAP)" }, + "Message Access (MAP)", + OBEX_PROFILE_MAP }, { { 0xbb, 0x58, 0x2b, 0x41, 0x42, 0x0c, 0x11, 0xdb, 0xb0, 0xde, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 }, 16, - "Message Notification (MNS)" }, + "Message Notification (MNS)", + OBEX_PROFILE_MAP }, { { 0x71, 0x63, 0xdd, 0x54, 0x4a, 0x7e, 0x11, 0xe2, 0xb4, 0x7c, 0x00, 0x50, 0xc2, 0x49, 0x00, 0x48 }, 16, - "Basic Imaging (BIP, AVRCP Cover Art)" }, + "Basic Imaging (BIP, AVRCP Cover Art)", + OBEX_PROFILE_BIP }, { { 'I', 'R', 'M', 'C', '-', 'S', 'Y', 'N', 'C' }, 9, - "Synchronization (IrMC/SyncML)" }, + "Synchronization (IrMC/SyncML)", + OBEX_PROFILE_UNKNOWN }, { } };
@@ -775,6 +857,22 @@ static const char *obex_target_str(const uint8_t *data, uint16_t len)return NULL ; } +static enum obex_profile obex_target_profile (const uint8_t *data, +uint16_t len) +{ +int i; + +for (i =0 ; obex_target_table[i].len; i++) { +if (obex_target_table[i].len != len) +continue ; + +if (!memcmp (obex_target_table[i].uuid, data, len)) +return obex_target_table[i].profile; + } + +return OBEX_PROFILE_UNKNOWN ; +} +static void print_unicode_header (const char *label,const uint8_t *data,uint16_t len,uint8_t indent) {
@@ -805,8 +903,200 @@ static void print_unicode_header(const char *label, const uint8_t *data,print_field ("%*c%s: %s" , indent,' ' , label, buf); } +/* Application Parameters (Tag/Len/Value) tag tables for profiles whose +* tag assignments are known. Tag IDs and names are taken from the +* PBAP/MAP/BIP specifications; types indicate how to decode a tag's +* value when its length matches what the spec defines for it. +*/ +enum obex_aparam_type { +OBEX_APARAM_U8 , +OBEX_APARAM_U16 , +OBEX_APARAM_U32 , +OBEX_APARAM_U64 , +OBEX_APARAM_U128 , +OBEX_APARAM_STR , +OBEX_APARAM_BYTES , +}; + +struct obex_aparam_tag { +uint8_t tag; +const char *str; +enum obex_aparam_type type; +}; + +static const struct obex_aparam_tag obex_pbap_aparam_table[] = { + {0x01 ,"Order" ,OBEX_APARAM_U8 }, + {0x02 ,"Search Value" ,OBEX_APARAM_STR }, + {0x03 ,"Search Attribute" ,OBEX_APARAM_U8 }, + {0x04 ,"Max List Count" ,OBEX_APARAM_U16 }, + {0x05 ,"List Start Offset" ,OBEX_APARAM_U16 }, + {0x06 ,"Filter" ,OBEX_APARAM_U64 }, + {0x07 ,"Format" ,OBEX_APARAM_U8 }, + {0x08 ,"Phonebook Size" ,OBEX_APARAM_U16 }, + {0x09 ,"New Missed Calls" ,OBEX_APARAM_U8 }, + {0x0a ,"Primary Folder Version" ,OBEX_APARAM_U128 }, + {0x0b ,"Secondary Folder Version" ,OBEX_APARAM_U128 }, + {0x0c ,"vCard Selector" ,OBEX_APARAM_U64 }, + {0x0d ,"Database Identifier" ,OBEX_APARAM_U128 }, + {0x0e ,"vCard Selector Operator" ,OBEX_APARAM_U8 }, + {0x0f ,"Reset New Missed Calls" ,OBEX_APARAM_U8 }, + {0x10 ,"Supported Features" ,OBEX_APARAM_U32 }, + { } +}; + +static const struct obex_aparam_tag obex_map_aparam_table[] = { + {0x01 ,"Max List Count" ,OBEX_APARAM_U16 }, + {0x02 ,"List Start Offset" ,OBEX_APARAM_U16 }, + {0x03 ,"Filter Message Type" ,OBEX_APARAM_U8 }, + {0x04 ,"Filter Period Begin" ,OBEX_APARAM_STR }, + {0x05 ,"Filter Period End" ,OBEX_APARAM_STR }, + {0x06 ,"Filter Read Status" ,OBEX_APARAM_U8 }, + {0x07 ,"Filter Recipient" ,OBEX_APARAM_STR }, + {0x08 ,"Filter Originator" ,OBEX_APARAM_STR }, + {0x09 ,"Filter Priority" ,OBEX_APARAM_U8 }, + {0x0a ,"Attachment" ,OBEX_APARAM_U8 }, + {0x0b ,"Transparent" ,OBEX_APARAM_U8 }, + {0x0c ,"Retry" ,OBEX_APARAM_U8 }, + {0x0d ,"New Message" ,OBEX_APARAM_U8 }, + {0x0e ,"Notification Status" ,OBEX_APARAM_U8 }, + {0x0f ,"MAS Instance ID" ,OBEX_APARAM_U8 }, + {0x10 ,"Parameter Mask" ,OBEX_APARAM_U32 }, + {0x11 ,"Folder Listing Size" ,OBEX_APARAM_U16 }, + {0x12 ,"Listing Size" ,OBEX_APARAM_U16 }, + {0x13 ,"Subject Length" ,OBEX_APARAM_U8 }, + {0x14 ,"Charset" ,OBEX_APARAM_U8 }, + {0x15 ,"Fraction Request" ,OBEX_APARAM_U8 }, + {0x16 ,"Fraction Deliver" ,OBEX_APARAM_U8 }, + {0x17 ,"Status Indicator" ,OBEX_APARAM_U8 }, + {0x18 ,"Status Value" ,OBEX_APARAM_U8 }, + {0x19 ,"MSE Time" ,OBEX_APARAM_STR }, + {0x1a ,"Database Identifier" ,OBEX_APARAM_BYTES }, + {0x1b ,"Conversation Listing Version Counter" ,OBEX_APARAM_BYTES }, + {0x1c ,"Presence Availability" ,OBEX_APARAM_U8 }, + {0x1d ,"Presence Text" ,OBEX_APARAM_STR }, + {0x1e ,"Last Activity" ,OBEX_APARAM_STR }, + {0x1f ,"Filter Last Activity Begin" ,OBEX_APARAM_STR }, + {0x20 ,"Filter Last Activity End" ,OBEX_APARAM_STR }, + {0x21 ,"Chat State" ,OBEX_APARAM_U8 }, + {0x22 ,"Conversation ID" ,OBEX_APARAM_BYTES }, + {0x23 ,"Folder Version Counter" ,OBEX_APARAM_BYTES }, + {0x24 ,"Filter Message Handle" ,OBEX_APARAM_STR }, + {0x25 ,"Notification Filter Mask" ,OBEX_APARAM_U32 }, + {0x26 ,"Conversation Parameter Mask" ,OBEX_APARAM_U32 }, + {0x27 ,"Filter Message Source Type" ,OBEX_APARAM_U8 }, + {0x29 ,"MAP Supported Features" ,OBEX_APARAM_U32 }, + { } +}; + +static const struct obex_aparam_tag obex_bip_aparam_table[] = { + {0x01 ,"Number of Returned Handles" ,OBEX_APARAM_U16 }, + {0x02 ,"List Start Offset" ,OBEX_APARAM_U16 }, + {0x03 ,"Latest Captured Images" ,OBEX_APARAM_U8 }, + {0x04 ,"Partial File Length" ,OBEX_APARAM_U32 }, + {0x05 ,"Partial File Start Offset" ,OBEX_APARAM_U32 }, + {0x06 ,"Total File Size" ,OBEX_APARAM_U32 }, + {0x07 ,"End Flag" ,OBEX_APARAM_U8 }, + {0x08 ,"Remote Display" ,OBEX_APARAM_U8 }, + { } +}; + +static void obex_print_apparam_tag (enum obex_profile profile,uint8_t tag, +const uint8_t *data,uint8_t len, +uint8_t indent) +{ +const struct obex_aparam_tag *table; +int i; + +switch (profile) { +case OBEX_PROFILE_PBAP : + table = obex_pbap_aparam_table; +break ; +case OBEX_PROFILE_MAP : + table = obex_map_aparam_table; +break ; +case OBEX_PROFILE_BIP : + table = obex_bip_aparam_table; +break ; +case OBEX_PROFILE_UNKNOWN : +default : + table =NULL ; +break ; + } + +for (i =0 ; table && table[i].str; i++) { +if (table[i].tag != tag) +continue ; + +switch (table[i].type) { +case OBEX_APARAM_U8 : +if (len ==1 ) { +print_field ("%*c%s: %d (0x%02x)" , indent,' ' , + table[i].str, data[0 ], + data[0 ]); +return ; + } +break ; +case OBEX_APARAM_U16 : +if (len ==2 ) { +uint16_t val =get_be16 (data); + +print_field ("%*c%s: %u (0x%04x)" , indent,' ' , + table[i].str, val, val); +return ; + } +break ; +case OBEX_APARAM_U32 : +if (len ==4 ) { +uint32_t val =get_be32 (data); + +print_field ("%*c%s: %u (0x%08x)" , indent,' ' , + table[i].str, val, val); +return ; + } +break ; +case OBEX_APARAM_U64 : +if (len ==8 ) { +print_field ("%*c%s: 0x%016" PRIx64, indent, +' ' , table[i].str, +get_be64 (data)); +return ; + } +break ; +case OBEX_APARAM_U128 : +if (len ==16 ) { +print_field ("%*c%s: 0x%016" PRIx64"%016" + PRIx64, indent,' ' , + table[i].str,get_be64 (data), +get_be64 (data +8 )); +return ; + } +break ; +case OBEX_APARAM_STR : +print_field ("%*c%s: %.*s" , indent,' ' , table[i].str, + len, data); +return ; +case OBEX_APARAM_BYTES : +break ; + } + +/* Known tag but unexpected length (or a raw-bytes type): +* still show the tag's name, with a length + hexdump +* instead of a decoded value. +*/ +print_field ("%*c%s: [len %d]" , indent,' ' , table[i].str, + len); +if (len) +packet_hexdump (data, len); +return ; + } + +print_field ("%*cTag 0x%02x len %d" , indent,' ' , tag, len); +if (len) +packet_hexdump (data, len); +} +static void obex_print_apparam (const uint8_t *data,uint16_t size, -uint8_t indent) +uint8_t indent,enum obex_profile profile) {uint16_t pos =0 ;
@@ -819,15 +1109,15 @@ static void obex_print_apparam(const uint8_t *data, uint16_t size,break ; } -print_field ("%*cTag 0x%02x len %d" , indent,' ' , tag, len); -if (len) -packet_hexdump (data + pos +2 , len); +obex_print_apparam_tag (profile, tag, data + pos +2 , len, + indent); pos +=2 + len; } } -static bool obex_print_headers (struct l2cap_frame *frame,uint8_t indent) +static bool obex_print_headers (struct l2cap_frame *frame,uint8_t indent, +uint16_t channel) {while (frame->size >0 ) {uint8_t hdr_id;
@@ -868,6 +1158,10 @@ static bool obex_print_headers(struct l2cap_frame *frame, uint8_t indent)if (profile) {print_field ("%*c%s: %s" , indent,' ' , label, profile); +obex_set_profile (frame->index, + frame->handle, channel, +obex_target_profile (data, + vlen)); }else {print_field ("%*c%s: [len %d]" , indent,' ' , label, vlen);
@@ -888,7 +1182,10 @@ static bool obex_print_headers(struct l2cap_frame *frame, uint8_t indent)if (hdr_id ==OBEX_HDR_APPARAM )obex_print_apparam (data, vlen, - indent +2 ); + indent +2 , +obex_get_profile (frame->index, + frame->handle, + channel));else if (vlen)packet_hexdump (data, vlen); }
@@ -1021,7 +1318,7 @@ void obex_packet(const struct l2cap_frame *frame, uint16_t channel) goto fail; } -if (!obex_print_headers (f, indent)) +if (!obex_print_headers (f, indent, channel)) goto fail;if (is_request)
Signature · 1 line
2.43.0
PATCH 4/4 monitor: Reassemble L2CAP ERTM/Streaming SAR fragments before dissecting
In reply to Frédéric DanisFrom: Frédéric Danis <[email protected]>
L2CAP ERTM/Streaming mode can segment a single upper-layer SDU across several I-frames (Start/Continuation/End SAR values). Previously each fragment was dissected independently, so OBEX PDUs spanning more than one fragment failed to parse ('frame too short') and S-frames (which carry no SAR field or payload) were incorrectly sent to the upper layer dissector as empty frames, adding further false positives.
Add per-channel, per-direction SDU reassembly buffers (chan->sdu_rx[]), filled across Start/Continuation/End I-frames and handed to the upper layer dissector only once the full SDU is available. S-frames are now skipped entirely before PSM dispatch.
While an SDU is still being reassembled (Start/Continuation fragments), the raw per-fragment payload is still hexdumped so no bytes are lost from the trace, but OBEX decoding itself only runs once on the complete SDU (on the End fragment).
To avoid printing bytes twice (once as a raw Start/Continuation fragment dump, and again inside a header value dump once the full PDU is decoded), obex_packet() now also takes the base and size of the fragment that triggered the call (the whole buffer for RFCOMM/ Unsegmented/untracked channels, or just the last physical I-frame's payload for a just-completed SAR reassembly). Internal hexdumps in obex.c are routed through a small obex_hexdump() helper that clips output to only the bytes carried by that fragment.
Since headers are serialized near the start of a PDU while a SAR reassembly's last fragment carries only its final bytes, restrict this clipping to Body/End-of-Body: Application Parameters and Target/Who header values are always shown unclipped, otherwise their contents would be dropped whenever they land in an earlier fragment than the one that completed reassembly.
--- monitor/l2cap.c | 175 ++++++++++++++++++++++++++++++++++++++++++----- monitor/obex.c | 63 +++++++++++++++-- monitor/obex.h | 3 +- monitor/rfcomm.c | 2 +- 4 files changed, 216 insertions(+), 27 deletions(-)
monitor/l2cap.c +156 -19
@@ -86,9 +86,21 @@#define L2CAP_SAR_START 0x01#define L2CAP_SAR_END 0x02#define L2CAP_SAR_CONTINUE 0x03 +#define L2CAP_SAR_NONE 0xff/* S-frame, no SAR field */ #define MAX_CHAN 64 +/* Reassembled L2CAP SDU for ERTM/Streaming mode channels using +* segmentation (SAR Start/Continuation/End). Tracked separately per +* direction since a bidirectional channel may have independent SDUs +* in flight each way. +*/ +struct l2cap_sdu { +uint8_t *data; +uint16_t len; +uint16_t total; +}; +struct chan_data {uint16_t index;uint16_t handle;
@@ -102,11 +114,19 @@ struct chan_data {uint8_t seq_num;uint16_t sdu;uint8_t fcs; +struct l2cap_sdu sdu_rx[2 ];struct packet_latency tx_l; };static struct chan_data chan_list[MAX_CHAN ]; +static void reset_sdu_rx (struct chan_data *chan) +{ +free (chan->sdu_rx[0 ].data); +free (chan->sdu_rx[1 ].data); +memset (chan->sdu_rx,0 ,sizeof (chan->sdu_rx)); +} +static void assign_scid (const struct l2cap_frame *frame,uint16_t scid,uint16_t psm,uint8_t mode,uint8_t ctrlid) {
@@ -146,6 +166,7 @@ static void assign_scid(const struct l2cap_frame *frame, uint16_t scid,if (n <0 )return ; +reset_sdu_rx (&chan_list[n]);memset (&chan_list[n],0 ,sizeof (chan_list[n])); chan_list[n].index = frame->index; chan_list[n].handle = frame->handle;
@@ -182,11 +203,13 @@ static void release_scid(const struct l2cap_frame *frame, uint16_t scid)if (frame->in) {if (chan_list[i].scid == scid) { +reset_sdu_rx (&chan_list[i]); chan_list[i].handle =0 ;break ; } }else {if (chan_list[i].dcid == scid) { +reset_sdu_rx (&chan_list[i]); chan_list[i].handle =0 ;break ; }
@@ -480,8 +503,11 @@ static char *mode2str(uint8_t mode) } } -static void l2cap_ctrl_ext_parse (struct l2cap_frame *frame,uint32_t ctrl) +static uint8_t l2cap_ctrl_ext_parse (struct l2cap_frame *frame,uint32_t ctrl, +uint16_t *sdu_len) { +uint8_t sar =L2CAP_SAR_NONE ; +display_printf (" %s:" , ctrl &L2CAP_EXT_CTRL_FRAME_TYPE ?"S-frame" :"I-frame" );
@@ -493,16 +519,14 @@ static void l2cap_ctrl_ext_parse(struct l2cap_frame *frame, uint32_t ctrl)if (ctrl &L2CAP_EXT_CTRL_POLL )display_printf (" P-bit" ); }else { -uint8_t sar = (ctrl &L2CAP_EXT_CTRL_SAR_MASK ) >> + sar = (ctrl &L2CAP_EXT_CTRL_SAR_MASK ) >>L2CAP_EXT_CTRL_SAR_SHIFT ;display_printf (" %s" ,sar2str (sar));if (sar ==L2CAP_SAR_START ) { -uint16_t len; - -if (!l2cap_frame_get_le16 (frame, &len)) -return ; +if (!l2cap_frame_get_le16 (frame, sdu_len)) +return L2CAP_SAR_NONE ; -display_printf (" (len %d)" , len); +display_printf (" (len %d)" , *sdu_len); } display_printf(" TxSeq %d", (ctrl & L2CAP_EXT_CTRL_TXSEQ_MASK) >>
@@ -514,10 +538,15 @@ static void l2cap_ctrl_ext_parse(struct l2cap_frame *frame, uint32_t ctrl)if (ctrl &L2CAP_EXT_CTRL_FINAL )display_printf (" F-bit" ); + +return sar; } -static void l2cap_ctrl_parse (struct l2cap_frame *frame,uint32_t ctrl) +static uint8_t l2cap_ctrl_parse (struct l2cap_frame *frame,uint32_t ctrl, +uint16_t *sdu_len) { +uint8_t sar =L2CAP_SAR_NONE ; +display_printf (" %s:" , ctrl &L2CAP_CTRL_FRAME_TYPE ?"S-frame" :"I-frame" );
@@ -529,17 +558,13 @@ static void l2cap_ctrl_parse(struct l2cap_frame *frame, uint32_t ctrl)if (ctrl &L2CAP_CTRL_POLL )display_printf (" P-bit" ); }else { -uint8_t sar; - sar = (ctrl &L2CAP_CTRL_SAR_MASK ) >>L2CAP_CTRL_SAR_SHIFT ;display_printf (" %s" ,sar2str (sar));if (sar ==L2CAP_SAR_START ) { -uint16_t len; - -if (!l2cap_frame_get_le16 (frame, &len)) -return ; +if (!l2cap_frame_get_le16 (frame, sdu_len)) +return L2CAP_SAR_NONE ; -display_printf (" (len %d)" , len); +display_printf (" (len %d)" , *sdu_len); }display_printf (" TxSeq %d" , (ctrl &L2CAP_CTRL_TXSEQ_MASK ) >>L2CAP_CTRL_TXSEQ_SHIFT );
@@ -550,6 +575,8 @@ static void l2cap_ctrl_parse(struct l2cap_frame *frame, uint32_t ctrl)if (ctrl &L2CAP_CTRL_FINAL )display_printf (" F-bit" ); + +return sar; }#define MAX_INDEX 16
@@ -2704,6 +2731,70 @@ static void smp_packet(uint16_t index, bool in, uint16_t handle, opcode_data->func (&frame); } +/* Reassemble ERTM/Streaming mode SAR fragments (Start/Continuation/End) +* into a single SDU before handing it to the upper layer dissector. +* Returns true when frame now holds a complete payload ready for +* dispatch (either because sar is the end of a multi-fragment SDU, or +* because reassembly could not be tracked and the single fragment +* should be dispatched as-is). Returns false while more fragments are +* still expected. +*/ +static bool l2cap_sdu_reassemble (struct chan_data *chan,bool in, +uint8_t sar,uint16_t sdu_len, +struct l2cap_frame *frame) +{ +struct l2cap_sdu *sdu; +uint32_t len; + +if (!chan) +return true; + + sdu = &chan->sdu_rx[in ?1 :0 ]; + +if (sar ==L2CAP_SAR_START ) { +if (sdu->data) { +print_text (COLOR_ERROR , +"incomplete SDU replaced by new Start segment" ); +free (sdu->data); + } + + sdu->len =0 ; + sdu->total = sdu_len; + sdu->data =malloc (sdu_len); + +if (!sdu->data) { + sdu->total =0 ; +return true; + } + }else if (!sdu->data) { +print_text (COLOR_ERROR ,"unexpected continuation segment" ); +return true; + } + + len = sdu->len + (uint32_t ) frame->size; +if (len > sdu->total) + len = sdu->total; + +if (len > sdu->len) +memcpy (sdu->data + sdu->len, frame->data, len - sdu->len); + sdu->len = len; + +if (sar !=L2CAP_SAR_END ) +return false; + +if (sdu->len != sdu->total) +print_text (COLOR_ERROR ,"reassembled SDU length mismatch" ); + + frame->data = sdu->data; + frame->size = sdu->len; + + sdu->data =NULL ; + sdu->len =0 ; + sdu->total =0 ; + +return true; +} +void l2cap_frame (uint16_t index,bool in,uint16_t handle,uint16_t cid,uint16_t psm,const void *data,uint16_t size) {
@@ -2712,6 +2803,10 @@ void l2cap_frame(uint16_t index, bool in, uint16_t handle, uint16_t cid,uint32_t ctrl32 =0 ;uint16_t ctrl16 =0 ;uint8_t ext_ctrl; +uint8_t sar =L2CAP_SAR_UNSEGMENTED ; +uint16_t sdu_len =0 ; +uint16_t frag_len = size; +void *sdu_buf =NULL ;switch (cid) {case 0x0001 :
@@ -2778,7 +2873,8 @@ void l2cap_frame(uint16_t index, bool in, uint16_t handle, uint16_t cid, frame.psm,mode2str (frame.mode), frame.mode, frame.chan); -l2cap_ctrl_ext_parse (&frame, ctrl32); + sar =l2cap_ctrl_ext_parse (&frame, ctrl32, + &sdu_len); }else {if (!l2cap_frame_get_le16 (&frame, &ctrl16))return ;
@@ -2791,7 +2887,8 @@ void l2cap_frame(uint16_t index, bool in, uint16_t handle, uint16_t cid, frame.psm,mode2str (frame.mode), frame.mode, frame.chan); -l2cap_ctrl_parse (&frame, ctrl16); + sar =l2cap_ctrl_parse (&frame, ctrl16, + &sdu_len); }display_printf ("\n" );
@@ -2805,6 +2902,44 @@ void l2cap_frame(uint16_t index, bool in, uint16_t handle, uint16_t cid,if (chan && chan->fcs && frame.size >=2 ) frame.size -=2 ; +/* Size of just this I-frame's own payload, before +* it is possibly replaced by the full reassembled +* SDU below. Used so the OBEX dissector can limit +* fallback/binary hexdumps to the bytes carried by +* the final fragment, instead of repeating bytes +* already shown while earlier fragments (Start/ +* Continuation) were buffered. +*/ + frag_len = frame.size; + +if (sar !=L2CAP_SAR_UNSEGMENTED && + sar !=L2CAP_SAR_NONE ) { +if (!l2cap_sdu_reassemble (chan, frame.in, sar, + sdu_len, + &frame)) { +/* Still buffering (Start/Continue): +* show the raw fragment payload, the +* upper layer dissector only runs +* once the SDU is fully reassembled. +*/ +if (frame.size) +packet_hexdump (frame.data, + frame.size); +return ; + } + +if (sar ==L2CAP_SAR_END ) + sdu_buf = (void *) frame.data; + } + +break ; + } + +/* S-frames (supervisory, e.g. RR/REJ) carry no SDU payload +* and must not be handed to upper layer dissectors. +*/ +if (sar ==L2CAP_SAR_NONE ) { +free (sdu_buf);break ; }
@@ -2833,16 +2968,18 @@ void l2cap_frame(uint16_t index, bool in, uint16_t handle, uint16_t cid,break ;case 0x1001 :obex_packet (&frame,l2cap_chan_key (index, in, handle, - cid)); + cid), frag_len);break ;default :if (obex_psm (index, handle, frame.psm))obex_packet (&frame,l2cap_chan_key (index, in, - handle, cid)); + handle, cid), frag_len);else packet_hexdump (data, size);break ; } + +free (sdu_buf);break ; } }
monitor/obex.c +57 -6
118 lines not on this page · raw message
monitor/obex.h +2 -1
@@ -101,7 +101,8 @@#define OBEX_HDR_TYPE_UINT8 0x80#define OBEX_HDR_TYPE_UINT32 0xc0 -void obex_packet (const struct l2cap_frame *frame,uint16_t channel); +void obex_packet (const struct l2cap_frame *frame,uint16_t channel, +uint16_t frag_len);void obex_add_channel (uint16_t index,uint16_t handle,uint8_t channel,const char *profile);
monitor/rfcomm.c +1 -1
@@ -405,7 +405,7 @@ static bool uih_frame(struct rfcomm_frame *rfcomm_frame, uint8_t indent) }if (obex_channel (frame->index, frame->handle, channel,NULL )) -obex_packet (frame, channel); +obex_packet (frame, channel, frame->size);else packet_hexdump (frame->data, frame->size);
Signature · 1 line
2.43.0
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1219437/
---Test result---
Test Summary:
CheckPatch PASS 2.70 seconds GitLint FAIL 1.12 seconds BuildEll PASS 18.68 seconds BluezMake PASS 274.64 seconds MakeCheck PASS 13.54 seconds MakeDistcheck PASS 139.12 seconds CheckValgrind PASS 338.32 seconds CheckSmatch WARNING 250.09 seconds bluezmakeextell PASS 90.52 seconds TestFunctional FAIL 1145.47 seconds IncrementalBuild PASS 321.27 seconds ScanBuild PASS 985.39 seconds
Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,4/4] monitor: Reassemble L2CAP ERTM/Streaming SAR fragments before dissecting
1: T1 Title exceeds max length (84>80): "[BlueZ,4/4] monitor: Reassemble L2CAP ERTM/Streaming SAR fragments before dissecting"
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:monitor/packet.c:2293:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:4220:52: warning: array of flexible structuresmonitor/bt.h:4208:40: warning: array of flexible structures
##############################
Test: TestFunctional - FAIL
Desc: Run test-functional
Output:
FAIL functional.test_bap::test_bass_past_earbuds_transport_acquire[hosts11-vm3]: AssertionError: Failed to acquire: org.bluez.Error.Failed
https://github.com/bluez/bluez/pull/2880
---
Regards,
Linux Bluetooth
Luiz Augusto von Dentz
maintainerHi Frederic,
Quoted 45 lines · On Mon, Nov 23, 2026 at 9:15 AM <[email protected]> wrote:
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1219437/---Test result---
Test Summary:
CheckPatch PASS 2.70 seconds GitLint FAIL 1.12 seconds BuildEll PASS 18.68 seconds BluezMake PASS 274.64 seconds MakeCheck PASS 13.54 seconds MakeDistcheck PASS 139.12 seconds CheckValgrind PASS 338.32 seconds CheckSmatch WARNING 250.09 seconds bluezmakeextell PASS 90.52 seconds TestFunctional FAIL 1145.47 seconds IncrementalBuild PASS 321.27 seconds ScanBuild PASS 985.39 secondsDetails
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,4/4] monitor: Reassemble L2CAP ERTM/Streaming SAR fragments before dissecting1: T1 Title exceeds max length (84>80): "[BlueZ,4/4] monitor: Reassemble L2CAP ERTM/Streaming SAR fragments before dissecting"
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:monitor/packet.c:2293:26: warning: Variable length array isused.monitor/packet.c: note: in included file:monitor/bt.h:4220:52: warning: array of flexiblestructuresmonitor/bt.h:4208:40: warning: array of flexible structures
##############################
Test: TestFunctional - FAIL
Desc: Run test-functional
Output:
FAIL functional.test_bap::test_bass_past_earbuds_transport_acquire[hosts11-vm3]: AssertionError: Failed to acquire: org.bluez.Error.Failed
Quoted 5 lines
https://github.com/bluez/bluez/pull/2880
---
Regards,
Linux Bluetooth
Copilot flagged quite a few problems with this one:
https://github.com/bluez/bluez/pull/2880#pullrequestreview-6023439406
Signature · 1 line
Luiz Augusto von Dentz