Edit report at https://bugs.php.net/bug.php?id=42918&edit=1
ID: 42918 Updated by: [email protected] Reported by: estesp at fastmail dot us Summary: IPv6 addresses not supported in SNMP extension -Status: Assigned +Status: Feedback Type: Feature/Change Request Package: SNMP related Operating System: Linux PHP Version: 5CVS-2007-10-10 (snap) Assigned To: lytboris Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: ------------------------------------------------------------------------ [2011-08-20 16:24:12] [email protected] Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=315238 Log: document FR #55312, #42918 ------------------------------------------------------------------------ [2011-08-20 16:10:41] [email protected] Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=315237 Log: merge from trunk two commits: Adding IPv6 support (FR #42918) more code coverage ------------------------------------------------------------------------ [2011-08-20 15:53:36] [email protected] Automatic comment from SVN on behalf of lytboris Revision: http://svn.php.net/viewvc/?view=revision&revision=315236 Log: Adding IPv6 support (FR #42918) ------------------------------------------------------------------------ [2011-07-29 01:17:55] [email protected] Ping! This is 2011 and IPv6 spreading! Fixing this issue shouldn't be very hard as the underlying Net_SNMP library already supports IPv6: $ snmpwalk -v 2c -c public 'udp6:[::1]' sysname SNMPv2-MIB::sysName.0 = STRING: james $ snmpwalk -v 2c -c public 'udp6:::1' sysname SNMPv2-MIB::sysName.0 = STRING: james For testing the following hast to be put into /etc/snmp/snmpd.conf: agentAddress udp:127.0.0.1:161,udp6:[::1]:161 rwcommunity6 private ::1 rocommunity6 public ::1 Currently PHP still gives the following error: $ ~/workspace/php-src-5.4/sapi/cli/php -r 'echo snmpget("::1", "private", "IF-MIB::ifAlias.1");' Warning: snmpget(): Could not open snmp connection: Unknown host (::1) (Illegal seek) in Command line code on line 1 Different formats like "[::1]:161" or "::1:161" make no difference. ------------------------------------------------------------------------ [2010-04-14 14:39:00] j dot ek at gmx dot net Actually the code mentioned above occurs two times. First time in function "php_snmpv3" (for SNMPv3) and second in "php_snmp" (for v1 and v2c). It also seems that some other things should be updated to support IPv6 addresses, e.g. not only support IpAddress SMIv2 Base Type but also the more generic address schema described in RFC3291. On the other hand I cannot say whether the net-snmp library already does support this, but as they claim to be fully IPv6 compatible, it's worth a try. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=42918 -- Edit this bug report at https://bugs.php.net/bug.php?id=42918&edit=1
