-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RangeError: Division by zero #24
Comments
Definitely a bug. These input lists likely can likely to be divided down until a minimum remains that reproduces the error. Maybe you can help with that, otherwise I will try that myself later. |
Hi @silverwind, But unfortunately I don't see the relation between these elements and the ones in my original array. So I am afraid my knowledge about the topic is a bit to limited, in order to be able to simplify the example further ;-( |
@bartbutenaers , I think your problem happens because you mix up ipv4 and ipv6 addresses in your arrays. I process ipv4 and ipv6 ranges in two distinct steps and I have no problem at all. Excluding ipv6 ranges from ipv4 ranges (or the opposite) doesn't make any sense. You have to build a list of ipv4 ranges and a list of ipv6 ranges for each json file and process them separately. My code here : https://github.com/jmarcgit/google-nftables/blob/main/google-nftables.mjs |
Hi @silverwind,
Thanks for sharing this useful library!
I would like to allow only the Google API servers to access my home automation system for Google assistant. There is a python module available to calculate the ip ranges of the Google API servers (in this tutorial), but I need to convert that program to Javascript:
Here is a simplified version of my code:
But when I run this (via
node xxx.js
) I get the following error:I would really appreciate if you could help me with this, because the calculations are quite a bit away from my comfort zone...
Thanks!!
Bart
The text was updated successfully, but these errors were encountered: