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

JmDNS seems not bind the specified IP to the source socket #248

Open
FinixLei opened this issue Feb 17, 2023 · 0 comments
Open

JmDNS seems not bind the specified IP to the source socket #248

FinixLei opened this issue Feb 17, 2023 · 0 comments

Comments

@FinixLei
Copy link

When the NIC (Network Interface Card) contains several IPs, e.g. 169.254.0.[1-5]0 and 169.254.13.106,
although designate 169.254.13.106 as InetAddress for JmDNS.create(InetAddress) and JmDNS.create(InetAddress, String),
tcpdump still find the mDNS query packages are sent by 169.254.0.50.

$ ip a | grep 169
    inet 169.254.13.106/16 brd 169.254.255.255 scope link disc0:mc
    inet 169.254.0.10/16 scope link secondary disc0:dt
    ...
    inet 169.254.0.50/16 scope link secondary disc0:dt
    
$ ip route
...
169.254.0.0/16 dev disc0 proto kernel scope link src 169.254.13.106

$ tcpdump -i disc0 -nn host 169.254.0.50 or 169.254.13.106
...
07:04:24.390833 IP 169.254.0.50.5353 > 224.0.0.251.5353: 0 PTR (QM)? _http._tcp.local. (34)

Above test is based on 3.5.4, but it seems 3.5.8 has the same problem per the source code.
According to JmDNSImpl::openMulticastSocket(), it seems not bind any IP to the source socket.
Could this issue be fixed? Thanks.

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

No branches or pull requests

1 participant