[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-coders
Subject:    Re: libnetsnmp and file/socket descriptors >= 1024
From:       Bart Van Assche <bart.vanassche () gmail ! com>
Date:       2009-04-21 16:45:29
Message-ID: e2e108260904210945j22df5147y12701aa4816c2f13 () mail ! gmail ! com
[Download RAW message or body]

On Tue, Apr 21, 2009 at 4:48 PM, Dave Shield <D.T.Shield@liverpool.ac.uk> wrote:
> 2009/4/21 Bart Van Assche <bart.vanassche@gmail.com>:
>> <D.T.Shield@liverpool.ac.uk> wrote:
>>> OK - I've reverted that patch, and applied a simpler one to deal
>>> with the immediate problem.  (i.e. skip any fd's that are too large
>>> to be handled by fd_set, etc).
>>
>> Can you please remove the ">= FD_SETSIZE" tests again ? These cause
>> the Windows snmpd.exe to stop immediately (all socket handles on
>> Windows have a numeric value >= 1024).
>
> Hmmm...
>   as far as I can tell, the new "large_fd_set" processing still has
> no protection against the socket being tested being outside the
> valid set.

I admit that I should have been more clear about the changes between
the first and the second version of the patch that implements support
for large file descriptors. One of the changes I implemented is that
version two of the NETSNMP_LARGE_FD_SET(fd, fdset) macro now allocates
more memory if necessary in order to add file descriptor 'fd' to the
set 'fdset'. As long as all 'fd' values are return values of system
calls instead of being provided by untrusted external software, this
should work fine.

Bart.

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic