-
Notifications
You must be signed in to change notification settings - Fork 449
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
WIP: Fix detection of mac address on IPv6 systems #689
Conversation
else | ||
ip6address route[:src] | ||
end | ||
else | ||
macaddress iface[default_route[:dev]][:addresses].select{|k,v| v["family"]=="lladdr"}.first.first unless iface[default_route[:dev]][:flags].include? "NOARP" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the event routes were found, this won't fill in mac addr, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't forget this.
Ping? |
Sorry @jaymzh I've been out with the flu. Still recoverying |
unless route.nil? or route.empty? | ||
|
||
if route && !route.empty? | ||
macaddress iface[route[:dev]][:addresses].select{|k,v| v["family"]=="lladdr"}.first.first unless iface[route[:dev]][:flags].include? "NOARP" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine, but ftr, if you have v4 and v6 routes that match, v6 will win since it's done second.
Closing this out since @btm picked up the slack from my deathly illness and finished this. |
We failed to detect the mac address when lo has ipv4/ipv6, but all other interfaces only have ipv6. This is just a simplified version of Phil's code from #685 with specs added.