php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24760 Setting SNMP port fails to actually change anything
Submitted: 2003-07-22 19:05 UTC Modified: 2003-07-25 07:45 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: chuck+php at 2003 dot snew dot com Assigned:
Status: Closed Package: SNMP related
PHP Version: 4.3.3RC1 OS: FreeBSD (4 & 5)
Private report: No CVE-ID: None
 [2003-07-22 19:05 UTC] chuck+php at 2003 dot snew dot com
Description:
------------
snmpget ("myhost:10161", $community, $OID);

ends up putting out packets to port, er, 161, not 10161.

verified with tcpdump.

Putting printfs in ext/snmp/snmp.c shows that
the port is being parsed right, but the packets still
go out wrong.


Compiled against net-snmp-5.0.8 (current version of netsnmp) 

A nice bonus would be to allow TCP to be used (5.0.8 allows this
just fine).

Reproduce code:
---------------
<?php
$sysLoc = snmpwalk("host03.mydomain:10161", "public", "sysLocation.0", 20);
?>


tcpdump will show it going out 161

Expected result:
----------------
It *should* use port 10161 and talk to agent there.

Actual result:
--------------
Warning: snmpget(): No response from host03.$mydomain in
    /var/www/docs/foo.php on line 2

# agent is not listening on port 161

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-25 07:45 UTC] iliaa@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 13 12:01:27 2024 UTC