[PATCH BlueZ] mesh: acceptor: fix endianess issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Members of 'struct mesh_net_prov_caps' are in Over-the-Air order and
must be converted to host order first.

Fixes: 838ddc931263 ("mesh: provisionee: Check prov start parameters")
---
 mesh/prov-acceptor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mesh/prov-acceptor.c b/mesh/prov-acceptor.c
index 241345bdd1ea..0ea9bb84cf36 100644
--- a/mesh/prov-acceptor.c
+++ b/mesh/prov-acceptor.c
@@ -408,14 +408,14 @@ static bool prov_start_check(struct prov_start *start,
 		break;
 
 	case 2: /* Output OOB */
-		if (!(caps->output_action & (1 << start->auth_action)) ||
+		if (!(L_BE16_TO_CPU(caps->output_action) & (1 << start->auth_action)) ||
 							start->auth_size == 0)
 			return false;
 
 		break;
 
 	case 3: /* Input OOB */
-		if (!(caps->input_action & (1 << start->auth_action)) ||
+		if (!(L_BE16_TO_CPU(caps->input_action) & (1 << start->auth_action)) ||
 							start->auth_size == 0)
 			return false;
 
-- 
2.44.1





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux