File tree 3 files changed +3
-3
lines changed 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 154
154
from pcapkit .protocols .schema .misc .pcapng import NS_DNSIP4AddrOption as Schema_NS_DNSIP4AddrOption
155
155
from pcapkit .protocols .schema .misc .pcapng import NS_DNSIP6AddrOption as Schema_NS_DNSIP6AddrOption
156
156
from pcapkit .protocols .schema .misc .pcapng import NS_DNSNameOption as Schema_NS_DNSNameOption
157
- from pcapkit .protocols .schema .misc .pcapng import Option as Schema_Option
158
157
from pcapkit .protocols .schema .misc .pcapng import PACK_FlagsOption as Schema_PACK_FlagsOption
159
158
from pcapkit .protocols .schema .misc .pcapng import PACK_HashOption as Schema_PACK_HashOption
160
159
from pcapkit .protocols .schema .misc .pcapng import PacketBlock as Schema_PacketBlock
190
189
from typing_extensions import Literal
191
190
192
191
from pcapkit .foundation .engines .pcapng import Context
192
+ from pcapkit .protocols .schema .misc .pcapng import Option as Schema_Option
193
193
from pcapkit .protocols .schema .schema import Schema
194
194
195
195
Packet = Union [Data_EnhancedPacketBlock , Data_SimplePacketBlock , Data_PacketBlock ]
Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ class PadOption(Option):
269
269
"""Header schema for HOPOPT padding options."""
270
270
271
271
#: Padding.
272
- pad : 'bytes' = PaddingField (length = lambda pkt : pkt [ 'len' ] )
272
+ pad : 'bytes' = PaddingField (length = lambda pkt : pkt . get ( 'len' , 0 ) )
273
273
274
274
if TYPE_CHECKING :
275
275
def __init__ (self , type : 'Enum_Option' , len : 'int' ) -> 'None' : ...
Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ class PadOption(Option):
269
269
"""Header schema for IPv6-Opts padding options."""
270
270
271
271
#: Padding.
272
- pad : 'bytes' = PaddingField (length = lambda pkt : pkt [ 'len' ] )
272
+ pad : 'bytes' = PaddingField (length = lambda pkt : pkt . get ( 'len' , 0 ) )
273
273
274
274
if TYPE_CHECKING :
275
275
def __init__ (self , type : 'Enum_Option' , len : 'int' ) -> 'None' : ...
You can’t perform that action at this time.
0 commit comments