]> git.ipfire.org Git - thirdparty/systemd.git/commit
resolved: detect and warn other running mDNS stack
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 21 Mar 2017 04:34:52 +0000 (13:34 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 21 Mar 2017 04:34:52 +0000 (13:34 +0900)
commit71a047d2f7ca37bb8e20e94622e94240f8812649
tree2d2e112d74092107d67f8da8dceb3dff67859e1f
parentc6a8f6f66da111a417cef7be81ceb9a8f336e541
resolved: detect and warn other running mDNS stack

Previously, `SO_REUSEADDR` is set before `bind`-ing socket, Thus,
even if another mDNS stack (e.g. avahi) 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-mdns.c