[quagga-dev 8943] [PATCH] check for errno after strtoul

Ulrich Weber ulrich.weber at Sophos.com
Thu Nov 10 09:46:55 GMT 2011


Hi,

there are a couple of strtoul calls which check for ULONG_MAX
but not for errno == ERANGE.

This results in different behavior on 32bit and 64 systems.
E.g. its not possible to set the metric via route maps to
4294967295 on 32bit systems.

Ok, I doubt that anyone use that numbers, but anyway... ;)

Second patch replaces "VTY_GET_LONG ("AS", as_ul, arg);"
by "VTY_GET_INTEGER_RANGE ("AS", as, arg, 1, BGP_AS4_MAX);"
as done in all other code, which parses AS numbers.

Third one sets maximum allowed number of ripng_timers to 65535,
as the documented maximum value. Or is the documentation wrong?

Cheers
Ulrich

-- 
Ulrich Weber | ulrich.weber at sophos.com | Senior Software Engineer
Astaro - a Sophos company | Amalienbadstr 41 | 76227 Karlsruhe | Germany
Phone +49-721-25516-0 | Fax –200 | www.astaro.com	


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-strtoul-check-for-errno-ERANGE-in-case-of-ULONG_MAX.patch
Type: text/x-patch
Size: 3798 bytes
Desc: not available
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20111110/53aaf0f8/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-bgp-use-VTY_GET_INTEGER_RANGE-BGP_AS4_MAX-in-bgp_cle.patch
Type: text/x-patch
Size: 1037 bytes
Desc: not available
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20111110/53aaf0f8/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-ripngd-limit-max-of-timers-basic-to-65535-as-documen.patch
Type: text/x-patch
Size: 1306 bytes
Desc: not available
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20111110/53aaf0f8/attachment-0005.bin>


More information about the Quagga-dev mailing list