[PATCH BlueZ 2/4] mesh: Verify padding bits in Friend Poll messages

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

 



The padding bits in a Friend Poll message must be zero.
See MshPRFv1.0.1 section 3.6.5.1.
---
 mesh/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mesh/net.c b/mesh/net.c
index 379a6e250..a8a527c2f 100644
--- a/mesh/net.c
+++ b/mesh/net.c
@@ -2059,7 +2059,7 @@ static bool ctl_received(struct mesh_net *net, uint32_t net_key_id,
 		break;
 
 	case NET_OP_FRND_POLL:
-		if (len != 1 || ttl)
+		if (len != 1 || ttl || pkt[0] > 1)
 			return false;
 
 		print_packet("Rx-NET_OP_FRND_POLL", pkt, len);
-- 
2.20.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