mirror of https://github.com/secdev/scapy.git
Merge pull request #250 from 6WIND/ipsec-fuzz
layers/ipsec: fix padding problems with fuzzed packets
This commit is contained in:
commit
5c74229bcf
|
@ -606,9 +606,6 @@ if AES and XCBCMAC:
|
||||||
icv_size=12,
|
icv_size=12,
|
||||||
key_size=(16,))
|
key_size=(16,))
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
def split_for_transport(orig_pkt, transport_proto):
|
def split_for_transport(orig_pkt, transport_proto):
|
||||||
"""
|
"""
|
||||||
|
@ -621,7 +618,8 @@ def split_for_transport(orig_pkt, transport_proto):
|
||||||
@return: a tuple (header, nh, payload) where nh is the protocol number of
|
@return: a tuple (header, nh, payload) where nh is the protocol number of
|
||||||
payload.
|
payload.
|
||||||
"""
|
"""
|
||||||
header = orig_pkt.copy()
|
# force resolution of default fields to avoid padding errors
|
||||||
|
header = orig_pkt.__class__(str(orig_pkt))
|
||||||
next_hdr = header.payload
|
next_hdr = header.payload
|
||||||
nh = None
|
nh = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue