From 0ce087a911fba81893cc29005751a8bfd23f3a3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20De=20Keersmaeker?= <francois.dekeersmaeker@uclouvain.be> Date: Wed, 31 May 2023 10:43:47 +0200 Subject: [PATCH] Fixed DHCP --- src/packet/BOOTP.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/packet/BOOTP.py b/src/packet/BOOTP.py index a095de0..805562b 100644 --- a/src/packet/BOOTP.py +++ b/src/packet/BOOTP.py @@ -20,14 +20,16 @@ class BOOTP(Packet): ] - def __init__(self, packet: scapy.Packet, id: int = 0) -> None: + def __init__(self, packet: scapy.Packet, id: int = 0, last_layer_index: int = -1) -> None: """ BOOTP/DHCP packet constructor. :param packet: Scapy Packet to be edited. :param id: Packet integer identifier. + :param last_layer_index: [Optional] Index of the last layer of the packet. + If not specified, it will be calculated. """ - super().__init__(packet, id) + super().__init__(packet, id, last_layer_index) self.dhcp_options = packet.getlayer("DHCP options") -- GitLab