When ipv6 packet has esp header libtins throw malformed packet exception. Example pcap is attached to issue.
As i can see, a problem is that esp extension does not have ordinary extension header format. See rfc2406. It just has SPI and Sequence number and that is all, trailing bytes are encrypted and libtins' ipv6 parser cannot does much about it. Better just pass it to ipsec parser that can parse SPI, sequence number and trailing bytes will be RawPDU.
When ipv6 packet has esp header libtins throw malformed packet exception. Example pcap is attached to issue.
As i can see, a problem is that esp extension does not have ordinary extension header format. See rfc2406. It just has SPI and Sequence number and that is all, trailing bytes are encrypted and libtins' ipv6 parser cannot does much about it. Better just pass it to ipsec parser that can parse SPI, sequence number and trailing bytes will be RawPDU.
I'l try to do Pull Request
esp.pcap.zip