We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6bb045 commit 0ce7d2dCopy full SHA for 0ce7d2d
scapy/contrib/cdp.py
@@ -250,19 +250,22 @@ class CDPMsgIPGateway(CDPMsgGeneric):
250
IPField("defaultgw", "192.168.0.1")]
251
252
253
-class IPPrefix(CDPMsgGeneric):
+class CDPIPPrefix(Packet):
254
fields_desc = [
255
IPField("prefix", "192.168.0.1"),
256
ByteField("plen", 24),
257
]
258
259
+ def guess_payload_class(self, p):
260
+ return conf.padding_layer
261
+
262
263
class CDPMsgIPPrefix(CDPMsgGeneric):
264
name = "IP Prefix"
265
type = 0x0007
266
fields_desc = [XShortEnumField("type", 0x0007, _cdp_tlv_types),
267
ShortField("len", 9),
- PacketListField("prefixes", [], IPPrefix,
268
+ PacketListField("prefixes", [], CDPIPPrefix,
269
length_from=lambda p: p.len - 4)]
270
271
0 commit comments