Brief description
The BGPKeepAlive class uses multiple inheritance from both BGP and BGPHeader, combined with the existing bind_layers(BGPHeader, BGPKeepAlive, {"type": 4}) binding. This causes a duplicate header to be appended at packet build time, resulting in 38-byte KEEPALIVE packets instead of the 19 octets required by RFC 4271:
"A KEEPALIVE message consists of only the message header and has a length of 19 octets."
Scapy version
2.4.5
Python version
3.8
Operating system
Linux 5.10.46
Additional environment information
No response
How to reproduce
To reproduce: build a BGPKeepAlive() packet and inspect its length via len(BGPKeepAlive()).
Workaround: instantiating BGPKeepAlive() directly without layering it on BGPHeader produces a compliant 19-byte packet. This has been validated against GNS3 simulations with Cisco IOS routers and real Cisco BGP traces.
Actual result
No response
Expected result
No response
Related resources
No response
Brief description
The BGPKeepAlive class uses multiple inheritance from both BGP and BGPHeader, combined with the existing bind_layers(BGPHeader, BGPKeepAlive, {"type": 4}) binding. This causes a duplicate header to be appended at packet build time, resulting in 38-byte KEEPALIVE packets instead of the 19 octets required by RFC 4271:
"A KEEPALIVE message consists of only the message header and has a length of 19 octets."
Scapy version
2.4.5
Python version
3.8
Operating system
Linux 5.10.46
Additional environment information
No response
How to reproduce
To reproduce: build a BGPKeepAlive() packet and inspect its length via len(BGPKeepAlive()).
Workaround: instantiating BGPKeepAlive() directly without layering it on BGPHeader produces a compliant 19-byte packet. This has been validated against GNS3 simulations with Cisco IOS routers and real Cisco BGP traces.
Actual result
No response
Expected result
No response
Related resources
No response