Fill unassigned bytes with 0xFF in J1939 VP2

pull/626/head
Samantaz Fox 2026-05-08 17:18:03 +02:00
parent 9743a2ffcf
commit 90383a0cca
No known key found for this signature in database
GPG Key ID: F42821059186176E
1 changed files with 6 additions and 0 deletions

View File

@ -270,6 +270,12 @@ static int j1939_vp2_get_data(struct j1939_vp_srv_priv *priv,
j1939_vp2_set_pdop(vp2p, pdop); j1939_vp2_set_pdop(vp2p, pdop);
j1939_vp2_set_tdop(vp2p, tdop); j1939_vp2_set_tdop(vp2p, tdop);
/* This PG's last 3 bytes are not assigned and hence must be set
* to 0xFF as per J1939-71, section 5.2 */
vp2p->unused5 = 0xFF;
vp2p->unused6 = 0xFF;
vp2p->unused7 = 0xFF;
return 0; return 0;
} }