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

[caclmgrd] Get first VLAN host IP address via next() #4685

Merged
merged 1 commit into from
Jun 2, 2020
Merged

[caclmgrd] Get first VLAN host IP address via next() #4685

merged 1 commit into from
Jun 2, 2020

Conversation

jleveque
Copy link
Contributor

@jleveque jleveque commented Jun 2, 2020

I found that with IPv4Network types, calling list(ip_ntwrk.hosts()) is reliable. However, when doing the same with an IPv6Network, I found that the conversion to a list can hang indefinitely. This appears to me to be a bug in the ipaddress.IPv6Network implementation. However, I could not find any other reports on the web.

This patch changes the behavior to call next() on the ip_ntwrk.hosts() generator instead, which returns the IP address of the first host.

@jleveque jleveque requested a review from lguohan June 2, 2020 06:57
@jleveque jleveque self-assigned this Jun 2, 2020
@lguohan
Copy link
Collaborator

lguohan commented Jun 2, 2020

i am not sure this is a bug, ipv6 subnet range is huge! definitely need to switch to iterator.

@lguohan lguohan merged commit 7b80377 into sonic-net:master Jun 2, 2020
abdosi pushed a commit that referenced this pull request Jun 3, 2020
I found that with IPv4Network types, calling list(ip_ntwrk.hosts()) is reliable. However, when doing the same with an IPv6Network, I found that the conversion to a list can hang indefinitely. This appears to me to be a bug in the ipaddress.IPv6Network implementation. However, I could not find any other reports on the web.

This patch changes the behavior to call next() on the ip_ntwrk.hosts() generator instead, which returns the IP address of the first host.
yxieca pushed a commit that referenced this pull request Jun 9, 2020
I found that with IPv4Network types, calling list(ip_ntwrk.hosts()) is reliable. However, when doing the same with an IPv6Network, I found that the conversion to a list can hang indefinitely. This appears to me to be a bug in the ipaddress.IPv6Network implementation. However, I could not find any other reports on the web.

This patch changes the behavior to call next() on the ip_ntwrk.hosts() generator instead, which returns the IP address of the first host.
@jleveque jleveque deleted the fix_caclmgrd branch July 24, 2020 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants