Hi!
I gave 3.1.2.4 of draft-ietf-sipping-torture-tests-07 a try and sent
- a REGISTER with Expires > 2^31 and lower than 2^32 (2147483748 in my case). - a REGISTER with Expires > 2^32 (4294967596 = 2^32 + 300)
I used print_expires() to print the resulting values SER (0.9.3 + changes) parsed.
It's a negative value in first case and 300 in the latter one. parser/parse_expires.h defines exp_body_t to have 'int val' which is not enough to store the parsed values.
Changing it to 'unsigned int val' prevents the negative values from coming up in SER but does not solve the main problem. The draft stats that a default value of 3600 seconds should be assumed in case of errors, so an additional check to make sure _e->val will always be below 2^32 is necessary.
I do have a small patch for our non-standard branch and could wrap one up for HEAD if needed.
Hendrik
Hi!
Hendrik Scholz wrote:
- a REGISTER with Expires > 2^31 and lower than 2^32 (2147483748 in my case).
- a REGISTER with Expires > 2^32 (4294967596 = 2^32 + 300)
I've set the Expires: header to the appropriate values in the previous tests. In another one I now left out the Expires header and instead added ;expires=<value> to the Contact header field.
A different function is invoked and a value of 2^32 + 300 is processed and the 200 OK contains an expire timer of 300 seconds. The draft says it should be 3600 though.
Hendrik
Thanks for the info. FYI, SER cannot handle the full expires range (2^32), because the expires value is stored as absolute value in memory. Thus SER would add current time to the expires value from REGISTER message and then store this value as an integer.
We could possibly change it to long, but I prefer not to do it at the moment, because it hasn't been a problem so far.
Could you, please, post your patch to serdev@lists.iptel.org ? I will review and integrate it.
Jan.
On 31-08-2005 14:50, Hendrik Scholz wrote:
Hi!
I gave 3.1.2.4 of draft-ietf-sipping-torture-tests-07 a try and sent
- a REGISTER with Expires > 2^31 and lower than 2^32 (2147483748 in my case).
- a REGISTER with Expires > 2^32 (4294967596 = 2^32 + 300)
I used print_expires() to print the resulting values SER (0.9.3 + changes) parsed.
It's a negative value in first case and 300 in the latter one. parser/parse_expires.h defines exp_body_t to have 'int val' which is not enough to store the parsed values.
Changing it to 'unsigned int val' prevents the negative values from coming up in SER but does not solve the main problem. The draft stats that a default value of 3600 seconds should be assumed in case of errors, so an additional check to make sure _e->val will always be below 2^32 is necessary.
I do have a small patch for our non-standard branch and could wrap one up for HEAD if needed.
Hendrik
-- freenet Cityline GmbH, Hamburger Chaussee 2-4, 24114 Kiel, Germany Phone: +49 (0)431 9020552, Fax: +49 (0)431 9020559 Internet: http://www.freenet.de, eMail: hendrik.scholz@freenet-ag.de
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers