glpi-project / glpi

GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
https://glpi-project.org
GNU General Public License v3.0
4.29k stars 1.29k forks source link

Support for IPv6-mapped IPv4 addresses #9138

Closed jplitza closed 3 years ago

jplitza commented 3 years ago

Describe the bug

It is currently impossible to enter an IP address like ::ffff:192.168.0.1 even though this is perfectly valid syntax. In particular, it is also valid for arbitrary IPv6 prefixes (typical uses include 64:ff9b::/96 for NAT64 and ::ffff:/96 for "IPv6 notation of native IPv4 addresses", but we also have atypical use cases with public prefixes)

Page(s) URL

/front/networkname.form.php

To reproduce

Steps to reproduce the behavior:

  1. Go to 'Network devices'
  2. Click on an arbitrary device
  3. Select a network port
  4. Enter ::ffff:192.168.0.1 as address
  5. Save
  6. Error: "Invalid IP address: ::ffff:192.168.0.1"

Expected behavior

The address is accepted and saved verbatim, with the binary representation being equivalent to ::ffff:c0a8:1

Logs

irrelevant

Screenshots

irrelevant

Your GLPI setup (you can find it in Setup > General menu, System tab)

irrelevant

Additional context

none

cedric-anne commented 3 years ago

Hi,

Could you check #9139 ?

Regards