SNMP module should not strip non-standard SNMP port from hostname
| Bug #60749 | SNMP module should not strip non-standard SNMP port from hostname | ||||
|---|---|---|---|---|---|
| Submitted: | 2012-01-13 17:39 UTC | Modified: | 2013-09-11 18:40 UTC | ||
| From: | lytboris@php.net | Assigned: | lytboris (profile) | ||
| Status: | Closed | Package: | SNMP related | ||
| PHP Version: | 5.4.0RC5 | OS: | * | ||
| Private report: | No | CVE-ID: | None | ||
[2012-01-13 17:39 UTC] lytboris@php.net
Description:
------------
From net-snmp/include/net-snmp/types.h, struct snmp_session:
/** name or address of default peer (may include transport specifier and/or port number) */
char *peername;
/** UDP port number of peer. (NO LONGER USED - USE peername INSTEAD) */
u_short remote_port;
php-snmp should place non-standard SNMP port into peername after name resolution.
Test script:
---------------
$session = new SNMP(SNMP::VERSION_1, "$hostname:$port", $community, $timeout, $retries);
$session->get(".1");
Expected result:
----------------
$session->get() will send request to "$hostname:$port"
Actual result:
--------------
$session->get() will send request to "$hostname:161"
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2013-02-08 05:10 UTC] lytboris@php.net
[2013-09-11 17:32 UTC] hexetic at gmail dot com
[2013-09-11 18:40 UTC] lytboris@php.net
[2013-09-11 18:41 UTC] hexetic at gmail dot com