Skip to content

AttributeError: type object 'ipv4' has no attribute 'ipv4' when parsing ICMP packets #304

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

Open
BonelessPi opened this issue May 13, 2025 · 0 comments · May be fixed by #305
Open

AttributeError: type object 'ipv4' has no attribute 'ipv4' when parsing ICMP packets #304

BonelessPi opened this issue May 13, 2025 · 0 comments · May be fixed by #305

Comments

@BonelessPi
Copy link

While parsing ICMP packets of type time_exceeded or destination_unreachable, the following error occurs:
AttributeError: type object 'ipv4' has no attribute 'ipv4'

This originates from pox/pox/lib/packet/icmp.py, where the offending code attempts to instantiate an ipv4 object:

from . import ipv4
self.next = ipv4.ipv4(raw=raw[self.MIN_LEN:],prev=self)

The fix would be to replace "ipv4.ipv4" with "ipv4" on lines 182 and 247.
Additionally, a quick scan of icmpv6.py suggests that there may be a similar issue on icmpv6.py line 915.

Related:

@BonelessPi BonelessPi linked a pull request May 14, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant