-
-
Notifications
You must be signed in to change notification settings - Fork 15.9k
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
MacAddressUtil prefers wrong MAC #5522
Comments
@CodingFabian isVirtual() sounds ok. Interested in submitting a PR ? |
@normanmaurer the isVirtual check is already in place, but these two interfaces are not considered virtual by java. |
I wonder if it might be better to score interfaces first and only use mac scoring as tie breaker. |
@trustin thoughts ? |
|
@CodingFabian sounds good... Can you provide a pr ? |
ok, the change would be that we first rank interfaces, and use mac ranking as tie breaker. Sounds for me like a possibly large impact change. what is the significance of the chosen mac in netty? |
@CodingFabian are you still interested in fixing this ? |
When using MacAddressUtil on a Windows server in Amazon, it selects the "wrong" best match.
Have a look at this output from
ifconfig /all
It is pretty obvious that
172.31.38.68
+02-57-3F-D8-7A-E9
is the best match. But MacAddressUtil disagrees.What happens is that netty first considers this as the best, but then it checks the tunnel devices:
and compares
02:57:3f:d8:7a:e9
with00:00:00:00:00:00:00:e0
.It turns out that
00:00:00:00:00:00:00:e0
is globally unique (which unfortunately is not true...)Even if that would be fixed, then it still would be choosen via:
Imho the best would be to enhance
to exclude these synthetic devices?
Any other ideas? Opinions?
The text was updated successfully, but these errors were encountered: