Grokbase Groups PHP php-bugs May 2013
Edit report at

  ID: 64765
  Updated by:
  Reported by: gmcgraw at udel dot edu
  Summary: Some IPv6 addresses get interpreted wrong
-Status: Feedback
+Status: No Feedback
  Type: Bug
  Package: SNMP related
  Operating System: Linux
  PHP Version: 5.4.14
  Assigned To: lytboris
  Block user comment: N
  Private report: N

  New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.

Previous Comments:
[2013-05-03 08:45:00]

Please try using this snapshot:

For Windows:

[2013-05-03 08:41:41]

Automatic comment on behalf of lytboris
Log: Fix bug #64765 (enclose IPv6 address into square brackets)

[2013-05-02 22:46:10] gmcgraw at udel dot edu

PHP sends the following string to Net-SNMP to parse as an address:


Net-SNMP understands the final part of the IP address to be a port number, since
it has no hexadecimal characters in it. There was an earlier bug filed and
fixed in PHP 5.4 that involved IPv6 but that fix only partially addressed the
issue (bug #42918). It made PHP correctly parse IPv6 address but it didn't
ensure that PHP sent Net-SNMP a form of address that it will always correctly

My patch causes square brackets to always surround the IPv6 address, so that
Net-SNMP cannot possibly interpret the last part of the Ipv6 address as a port
number. The port number will be placed outside the square brackets. Here is an
example of how it will now send the IPV6 address to Net-SNMP:


Or if there is a custom port number 1234:


Net-SNMP will correctly parse that and use the default SNMP port number (161) if
none is specified or the provided port number otherwise.

I have reproduced this in 5.4.1 and 5.4.14.

Test script:
$s=new SNMP(SNMP::VERSION_2C, '[fc00::23:250:56ff:fe82:3177]', 'public');

Expected result:
STRING: "Linux mykernel12345 #5 SMP Fri Jun 1 19:44:50 GMT 2012 x86_64"

Actual result:
Warning: SNMP::get(): No response from udp6:fc00::23:250:56ff:fe82:3177 in php
shell code on line 1


Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 5 | next ›
Discussion Overview
groupphp-bugs @
postedMay 2, '13 at 10:46p
activeOct 7, '14 at 11:19p



site design / logo © 2019 Grokbase