Skip to content

Commit 30c9f0a

Browse files
author
brentru
committed
break on padding opt
1 parent a028c34 commit 30c9f0a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

adafruit_wiznet5k/adafruit_wiznet5k_dhcp.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,8 @@ def parse_dhcp_response(self, response_timeout): # pylint: disable=too-many-bran
313313
ptr += 1
314314
self._t2 = int.from_bytes(_BUFF[ptr:ptr+opt_len], 'l')
315315
ptr += opt_len
316+
elif _BUFF[ptr] == 0:
317+
break
316318
else:
317319
# We're not interested in this option
318320
ptr += 1

0 commit comments

Comments
 (0)