Fixing Cisco DHCP Offer value

This commit is contained in:
Dom 2023-11-19 17:30:30 +00:00
parent 6a4adab6af
commit 65055dedd4

View File

@ -160,7 +160,7 @@ class Packet():
elif client_device_os == 'cisco_ios':
reply_packet_object.OPTIONS = b"".join(
[
bytes([53, 1, 3 if _type == 'offer' else 5]), # DHCP offer or ack packet
bytes([53, 1, 2 if _type == 'offer' else 5]), # DHCP offer or ack packet
bytes([54, 4] + [int(octet) for octet in settings['DHCP']['SERVER_IP'].split('.')]), # Server identifier (192.168.0.247)
bytes([51, 4, 0x00, 0x01, 0x51, 0x80]), # Lease time: 86400
bytes([1, 4, 255, 255, 255, 254]), # Subnet mask: 255.255.255.254