Skip to content

Fix #141 - Fix IPv6 handling in Via header for IPv6 with zero compression#142

Open
teerapap wants to merge 1 commit intoaboutsip:masterfrom
teerapap:fix-zero-compressed-ipv6-via-header
Open

Fix #141 - Fix IPv6 handling in Via header for IPv6 with zero compression#142
teerapap wants to merge 1 commit intoaboutsip:masterfrom
teerapap:fix-zero-compressed-ipv6-via-header

Conversation

@teerapap
Copy link
Contributor

Changes in detail

  • Implement consumeHost() method in SipParser loosely based on RFC 3261
  • Fix typo in method name consumeSentBye() -> consumeSentBy()
  • Refactor consumeVia() method to make use of consumeSentBy()
  • Refactor consumeSentBy() method to make use of consumeHost()
  • Improve consumeGenericParam() method to loosely handle host in addition to token
  • Add unit tests for IPv6 address with zero compression for Via header

Changes in detail
* Implement `consumeHost()` method in `SipParser` loosely based on RFC 3261
* Fix typo in method name `consumeSentBye()` -> `consumeSentBy()`
* Refactor `consumeVia()` method to make use of `consumeSentBy()`
* Refactor `consumeSentBy()` method to make use of `consumeHost()`
* Improve `consumeGenericParam()` method to loosely handle host in addition to token
* Add unit tests for IPv6 address with zero compression for Via header
@teerapap
Copy link
Contributor Author

Just found that some other tests fails. Will resubmit the pull request again

@teerapap
Copy link
Contributor Author

False alarm. It does not relate to this pull request changes.

Some tests failed because I was using JDK17 running mvn test.
It was about java reflection stuff.

Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @58651fd0
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
	at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
	at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
	at org.mockito.cglib.core.ReflectUtils$2.run(ReflectUtils.java:57)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
	at org.mockito.cglib.core.ReflectUtils.<clinit>(ReflectUtils.java:47)
	... 50 more

@teerapap teerapap reopened this Aug 17, 2023
@teerapap teerapap changed the title Fix#141 - Fix IPv6 handling in Via header for IPv6 with zero compression Fix #141 - Fix IPv6 handling in Via header for IPv6 with zero compression Aug 21, 2023
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

Successfully merging this pull request may close these issues.

1 participant