resolved: detect and warn other running LLMNR stack
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 21 Mar 2017 04:30:48 +0000 (13:30 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 21 Mar 2017 04:35:12 +0000 (13:35 +0900)
commit007ef0a224e01d9c6e3499da2bba14a2988a8a9d
tree7ddb91c1e1d86c4f17120c75eecd6748b7920b07
parent77525fdc8d60bff55b60b9e443401187204ddfe7
resolved: detect and warn other running LLMNR stack

Previously, `SO_REUSEADDR` is set before `bind`-ing socket, Thus,
even if another LLMNR stack is running, `bind` always success and
we cannot detect the other stack. By this commit, we first try to
`bind` without `SO_REUSEADDR`, and if it fails, show warning and
retry with `SO_REUSEADDR`.
src/resolve/resolved-llmnr.c