diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-03-21 22:30:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-21 22:30:32 -0400 |
commit | 2c7ef56459bf6fe7761595585aa4eed5cd183f27 (patch) | |
tree | 7ddb91c1e1d86c4f17120c75eecd6748b7920b07 /src/resolve/resolved-link.c | |
parent | 03bf096ba283bfcba0725375f152a823e998cdbc (diff) | |
parent | 007ef0a224e01d9c6e3499da2bba14a2988a8a9d (diff) |
Merge pull request #5531 from yuwata/mdns
resolved: do not start LLMNR or mDNS stack when no network enables them
Diffstat (limited to 'src/resolve/resolved-link.c')
-rw-r--r-- | src/resolve/resolved-link.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/resolve/resolved-link.c b/src/resolve/resolved-link.c index 3f7f9035cf..d06096f3f2 100644 --- a/src/resolve/resolved-link.c +++ b/src/resolve/resolved-link.c @@ -28,6 +28,8 @@ #include "mkdir.h" #include "parse-util.h" #include "resolved-link.h" +#include "resolved-llmnr.h" +#include "resolved-mdns.h" #include "string-util.h" #include "strv.h" @@ -523,10 +525,25 @@ static void link_read_settings(Link *l) { } int link_update(Link *l) { + int r; + assert(l); link_read_settings(l); link_load_user(l); + + if (l->llmnr_support != RESOLVE_SUPPORT_NO) { + r = manager_llmnr_start(l->manager); + if (r < 0) + return r; + } + + if (l->mdns_support != RESOLVE_SUPPORT_NO) { + r = manager_mdns_start(l->manager); + if (r < 0) + return r; + } + link_allocate_scopes(l); link_add_rrs(l, false); |