sngrep icon indicating copy to clipboard operation
sngrep copied to clipboard

Feature-Request: Add support for IPv6 assembly

Open sergey-safarov opened this issue 5 years ago • 5 comments

1.4.7 version did not show 200 OK response over IPv6 transport. Please check packets 4 and follows in the attached PCAP file. ipv6.pcap.gz

sergey-safarov avatar Aug 21 '20 10:08 sergey-safarov

Hi @sergey-safarov

Thanks for reporting!

After checking the pcap with wireshark I discovered that those 200 OK packets are not properly indicating the next header protocol is UDP (that should be 17). Because of that, sngrep is ignoring those packets with invalid protocol 44.

ipv6notudp

Regards!

Kaian avatar Aug 26 '20 09:08 Kaian

Could you look rfc8200 4.5. Fragment Header about.

The Fragment header is identified by a Next Header value of 44 in the immediately preceding header and has the following format:

Looks as when used IPv6 and packet is fragmented, then added "Fragment Header". Please check the screenshot. Screenshot from 2020-08-26 16-03-54

Also, Wireshark properly parses this fragmented packet. So, I think packet is correct.

sergey-safarov avatar Aug 26 '20 13:08 sergey-safarov

Hi @sergey-safarov

You're totally right. Actually there seems to be some ip frag header handling code, but IP Reasembly is far from working for IPv6.

The code assumes IPv4 during assembly so it must be updated to handle IPv6 properly. Reassembly code its a bit messy so I will convert this into a feature request and try to implement it for the next major release where assembly code is more clean.

Thanks a lot!

Kaian avatar Aug 27 '20 10:08 Kaian

As a workaround, I switched to use TCP transport and now can see the whole INVITE message.

sergey-safarov avatar Sep 23 '20 18:09 sergey-safarov