Page MenuHomeFreeBSD

net/pear-Net_IPv6: Add patches for handling zones
ClosedPublic

Authored by linnemannr_gmail.com on Aug 12 2022, 4:54 AM.
Tags
None
Referenced Files
F163397371: D36151.id109240.diff
Wed, Jul 22, 8:33 PM
F163370508: D36151.id.diff
Wed, Jul 22, 2:36 PM
F163330501: D36151.diff
Wed, Jul 22, 4:28 AM
Unknown Object (File)
Mon, Jul 20, 4:32 AM
Unknown Object (File)
Sun, Jul 19, 2:06 AM
Unknown Object (File)
Sat, Jul 11, 2:50 PM
Unknown Object (File)
Sat, Jul 11, 2:32 AM
Unknown Object (File)
Fri, Jul 10, 2:19 AM
Subscribers

Details

Summary

The upstream Net/IPv6 package from PEAR has significant bugs revolving around
handling of string presentation v6 addresses which have RFC 4007 zones. Patches
are added in this commit to address them plus a handful of other errors until an
updated version of the package becomes available with these changes included.

  • Add getZone() and removeZone() class methods
  • Alter SplitV64() to remove any zone before attempting to split an address into v6 and v4 parts. The zone has no meaning in this context
  • Alter compress to remove and restore a zone prior to restoring a prefix
  • Alter compress() to rejoin a compressed v6 part with a v4 part with a colon if the v6 part does not already end with one
  • Fix undefined variable '$address' in isCompressible()
  • Ensure no zone is present at the end of an address in _ip2Bin(). The zone is not a part of the binary address
  • Change string/int arithmetic to int/int arithmetic in _ip2Bin by mapping exploded v4 address octets to integer values
  • Fix unit tests to work in modern versions of php and phpunit
    • Align test case class name with source file name
    • Use phpunit namespaces
    • Make return type of AllTests::setUp() the expected 'void'

In addition, eight unit tests are added for basic verification of zone handling.

Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Aug 12 2022, 11:24 AM
This revision was automatically updated to reflect the committed changes.