Hello,
The function usm_parse_security_parameters, in
snmpusm.c, uses u_int for boots_uint and time_uint:
int
usm_parse_security_parameters(u_char * secParams,
size_t remaining,
u_char * secEngineID,
size_t * secEngineIDLen,
u_int * boots_uint,
u_int * time_uint,
char *secName,
size_t * secNameLen,
u_char * signature,
size_t *
signature_length,
u_char * salt,
size_t * salt_length,
u_char ** data_ptr)
The function actually parses
msgAuthoritativeEngineBoots and
msgAuthoritativeEngineTime as a long and then converts
to u_int. However, on some compilers u_int is 2 bytes
instead of 4. Shouldn't boots_uint and time_uint be
formated to a data type to ensure that it is always 4
bytes?
This is a problem for me because after enginetime
exceeds 65535, I begin receiving REPORT-PDUs and then
I see other corruption I am currently attributing to
this 4 byte vs 2 byte issue. I was going to just
change it and submit a patch, but
usm_parse_security_parameters actually parses
msgAuthoritativeEngineTime as a long and then casts it
to u_int. So, I thought it appropriate to ask the
three wisemen(I'm sure there's more, just doesn't
sound as good)......
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders