Skip to content

Commit c5a2ec5

Browse files
committed
Disallow 0x0000 as a PAN ID
The probability of it being randomly picked is about 0.002%
1 parent 31f1573 commit c5a2ec5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zigpy_znp/zigbee/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ async def form_network(self):
362362
network_key = self.config[conf.CONF_NWK][conf.CONF_NWK_KEY]
363363

364364
if pan_id is None:
365-
pan_id = random.SystemRandom().randint(0x0000, 0xFFFE + 1)
365+
pan_id = random.SystemRandom().randint(0x0001, 0xFFFE + 1)
366366

367367
if extended_pan_id is None:
368368
extended_pan_id = ExtendedPanId(os.urandom(8))

0 commit comments

Comments
 (0)