I think just managed to re-create your issue. Seems to actually be within the _CIDR_IPaddrBlockContainsIPaddr_ function.
I think it might be possible the function is failing due to integer overflows with 32-bit arithmetic? Will try to adjust for 64-bit arithmetic and using awk.
If that is correct it would be a similar issue to our cron-job "time calculator" we originally had some problems with.
Will investigate a bit more in the weeds now.
I am sorry to disappoint you, but script doesn't even hit this fuction at all - litterary. It finishes at the line, which I have written Yesterday at 8:12 PM. - leaving it empty and then hitting warning text return 1 bellow finishing _CheckWebGUILoginAccessOK_() function.
I am glad to see your code improvemnt in above mentioned function towards the math approach, and in the same sorry, that I was unable to persuade you to look earlier in the code.