Skip to content
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

IP version mismatch when processing ignored IPs #57

Closed
mrspartak opened this issue Jul 3, 2020 · 2 comments
Closed

IP version mismatch when processing ignored IPs #57

mrspartak opened this issue Jul 3, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@mrspartak
Copy link

As I can guess this is something with IP version mismatch?

ozq4l  2a02:2168:8abf:ad00:e85d:2f13:b1f:c00/128 and 192.168.1.1/32 are not of the same version
ozq4l  Traceback (most recent call last):
ozq4l    File "/usr/src/shynet/analytics/tasks.py", line 67, in ingress_request
ozq4l      if ignored_network.supernet_of(remote_ip):
ozq4l    File "/usr/local/lib/python3.8/ipaddress.py", line 1004, in supernet_of
ozq4l      return self._is_subnet_of(other, self)
ozq4l    File "/usr/local/lib/python3.8/ipaddress.py", line 991, in _is_subnet_of
ozq4l      raise TypeError(f"{a} and {b} are not of the same version")
ozq4l  TypeError: 2a02:2168:8abf:ad00:e85d:2f13:b1f:c00/128 and 192.168.1.1/32 are not of the same version
ozq4l  2a02:2168:8abf:ad00:e85d:2f13:b1f:c00/128 and 192.168.1.1/32 are not of the same version
ozq4l  Traceback (most recent call last):
ozq4l    File "/usr/src/shynet/analytics/tasks.py", line 67, in ingress_request
ozq4l      if ignored_network.supernet_of(remote_ip):
ozq4l    File "/usr/local/lib/python3.8/ipaddress.py", line 1004, in supernet_of
ozq4l      return self._is_subnet_of(other, self)
ozq4l    File "/usr/local/lib/python3.8/ipaddress.py", line 991, in _is_subnet_of
ozq4l      raise TypeError(f"{a} and {b} are not of the same version")
ozq4l  TypeError: 2a02:2168:8abf:ad00:e85d:2f13:b1f:c00/128 and 192.168.1.1/32 are not of the same version
ozq4l  2a02:2168:8abf:ad00:e85d:2f13:b1f:c00/128 and 192.168.1.1/32 are not of the same version
ozq4l  Traceback (most recent call last):
ozq4l    File "/usr/src/shynet/analytics/tasks.py", line 67, in ingress_request
ozq4l      if ignored_network.supernet_of(remote_ip):
ozq4l    File "/usr/local/lib/python3.8/ipaddress.py", line 1004, in supernet_of
ozq4l      return self._is_subnet_of(other, self)
ozq4l    File "/usr/local/lib/python3.8/ipaddress.py", line 991, in _is_subnet_of
ozq4l      raise TypeError(f"{a} and {b} are not of the same version")
ozq4l  TypeError: 2a02:2168:8abf:ad00:e85d:2f13:b1f:c00/128 and 192.168.1.1/32 are not of the same version
ozq4l  2a02:2168:8abf:ad00:e85d:2f13:b1f:c00/128 and 192.168.1.1/32 are not of the same version
ozq4l  Traceback (most recent call last):
ozq4l    File "/usr/src/shynet/analytics/tasks.py", line 67, in ingress_request
ozq4l      if ignored_network.supernet_of(remote_ip):
ozq4l    File "/usr/local/lib/python3.8/ipaddress.py", line 1004, in supernet_of
ozq4l      return self._is_subnet_of(other, self)
ozq4l    File "/usr/local/lib/python3.8/ipaddress.py", line 991, in _is_subnet_of
ozq4l      raise TypeError(f"{a} and {b} are not of the same version")
ozq4l  TypeError: 2a02:2168:8abf:ad00:e85d:2f13:b1f:c00/128 and 192.168.1.1/32 are not of the same version
@milesmcc
Copy link
Owner

milesmcc commented Jul 3, 2020

Ah, interesting. Good edge case. What's happening is that Shynet is trying to check if an IP is in the ignore list, but can't because the ignore list is ipv4 and the ip is ipv6.

Leaving this open for now, will fix sometime this weekend. In the meantime, a temporary fix is to clear the ignore list.

@milesmcc milesmcc self-assigned this Jul 3, 2020
@milesmcc milesmcc added the bug Something isn't working label Jul 3, 2020
@milesmcc milesmcc changed the title Found errors in app log IP version mismatch when processing ignored IPs Jul 3, 2020
@mrspartak
Copy link
Author

Ok, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants