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

Fix parse errors with link-local addresses #55

Closed
wants to merge 1 commit into from
Closed

Fix parse errors with link-local addresses #55

wants to merge 1 commit into from

Conversation

MartinBasti
Copy link
Contributor

@MartinBasti MartinBasti commented Sep 5, 2016

Link-local addresses received from netifaces contains '%suffix' that
causes parse error in IPNetwork class. We must remove %suffix before
it us used in IPNetwork objects.

https://fedorahosted.org/freeipa/ticket/6296

@tkrizek tkrizek self-assigned this Sep 6, 2016

# link-local addresses contain '%suffix' that causes parse
# errors in IPNetwork
addr = ifdata['addr'].split(u'%', 1)[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable addr shadows another variable from the same namespace. This results in an incorrect IP address in the error message when the IP does not mach any network interface.

# ipa-client-install --ip-address '2201:db8::'
...
no network interface matches the IP address and netmask fe80::21a:4aff:fe23:1530

Link-local addresses received from netifaces contains '%suffix' that
causes parse error in IPNetwork class. We must remove %suffix before
it us used in IPNetwork objects.

https://fedorahosted.org/freeipa/ticket/6296
@tkrizek tkrizek added the ack Pull Request approved, can be merged label Sep 6, 2016
@MartinBasti MartinBasti added the pushed Pull Request has already been pushed label Sep 6, 2016
@MartinBasti MartinBasti closed this Sep 6, 2016
@MartinBasti MartinBasti deleted the fix-local-addr branch October 4, 2016 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
2 participants