Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Via header fails to parse IPv6 with zero compression #141

Open
teerapap opened this issue Aug 17, 2023 · 0 comments
Open

Via header fails to parse IPv6 with zero compression #141

teerapap opened this issue Aug 17, 2023 · 0 comments

Comments

@teerapap
Copy link
Contributor

Problem statement

The exception is thrown when it parses a Via header containing an IPv6 which is zero-compressed as it expects a full form IPv6 with certain number of colon(:).

Input

Via: SIP/2.0/TLS [2001:213:ab56::8]:12345;received=2001:213:ab56::8;rport=12345;branch=xxxxxx;alias

Exception

 io.pkts.packet.sip.SipParseException: Found 5 which seems odd. Expecting 0, 1,
 7 or 8 colons in the Via-host:port portion. Please check your traffic
       at io.pkts.packet.sip.impl.SipParser.consumeVia(SipParser.java:1394)
       at io.pkts.packet.sip.header.ViaHeader$Builder.<init>(ViaHeader.java:301)
       at io.pkts.packet.sip.header.ViaHeader.frame(ViaHeader.java:210)
       at io.pkts.packet.sip.impl.SipParser.lambda$static$17(SipParser.java:241)
       at io.pkts.packet.sip.header.impl.SipHeaderImpl.ensure(SipHeaderImpl.java:75)
       at io.pkts.packet.sip.impl.ImmutableSipMessage.getViaHeaders(ImmutableSipMessage.java:184)
       at io.pkts.packet.sip.impl.ImmutableSipRequest.createResponse(ImmutableSipRequest.java:72)
       at io.pkts.packet.sip.SipMessage.createResponse(SipMessage.java:110)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant