Hello Guy,

On 2024-02-12 08:17, Guy Harris wrote:
On Feb 11, 2024, at 1:19 PM, Oliver Hartkopp <socket...@hartkopp.net> wrote:

Although the Priority 0x242 and the VCID 0xCD are correctly displayed in the 
grey line the values below that line seem to be wrong (Priority 52480, VCID 2).

Fixed in Wireshark change fdf4ecdb4aea61f6e557d75172d27ca0ffea79d7.

(All fixes mentioned have been backported to the 1.10 branch for libpcap and 
the 4.2 branch for Wireshark.)

I'm sorry but the fix went into the wrong direction and removed the formerly correct values in the grey'ed line.

In the attached screenshot you can see from the plain data

0000   00 cd 02 42 81 00 0a 00 af af af af 00 00 00 00
0010   00 00 00 00 00 00

VCID = 0xCD
PRIO = 0x0242 (here in correct in big endian)
Flags = 0x81 == CANXL_XLF and CANXL_SEC bits are set
SDT = 0x00
Length = 0x000A (is dec 10 in little endian)
AF = 0xAFAFAFAF

So the first three items need to be fixed.
CANXL_XLF (0x80) is missing in the flags.

I've seen that you do some bit-shifting and masking on proto_vcid in your latest patch.

I did so in my PoC too, when prio was still a 32 bit value like canid_t.

But now there are separate elements inside the first 32 bits (also in big endian expression):

  __u8  __res0; /* reserved / padding must be set to zero */
  __u8  vcid;   /* virtual CAN network identifier */
  __u16 prio;   /* 11 bit priority for arbitration */

and prio is only 16 bits.

Not sure what's the best way to get further here.

Many thanks,
Oliver
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Reply via email to