Skip to content

IPv6 Link-Local Addresses with Zone Identifiers Cause ParseException #206

Description

@MrMisterG

Description:

When creating SIP URIs containing IPv6 link-local addresses with zone identifiers, also known as scope identifiers, (e.g., fe80::abcd%eth0), the JAIN-SIP library throws a ParseException with the message "Illegal Host name". This occurs because the library incorrectly rejects valid IPv6 addresses containing the % character used for zone/scope identification.

The % character is illegal in a hostname therefore it would be safe to use it as a delimiter for trimming off the zone ID.

Reproduction Steps:

Create a SIP URI with an IPv6 link-local address containing a zone identifier:

String uri = "sip:user@[fe80::abcd:1234:5678:9abc%eth0]";
SipFactory.getInstance().createSipUri(uri); // Throws ParseException

Expected Behavior:

The library should either:

  • Accept IPv6 addresses with zone identifiers by stripping them for URI purposes (as per RFC 3986)
  • Provide a method to handle zone identifiers appropriately
  • Document the limitation and provide workarounds

See PR #205 for my proposed fix, which is based on the first suggestion

Impact:

Breaks IPv6 link-local communication in SIP applications
Forces developers to implement workarounds outside the library
Hinders IPv6 adoption in VoIP systems

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions