]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolve: Add support for mDNS to systemd-resolve utility
authorDmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Thu, 19 Jan 2017 09:47:51 +0000 (11:47 +0200)
committerDmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Thu, 19 Jan 2017 09:51:21 +0000 (11:51 +0200)
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
man/systemd-resolve.xml
src/resolve/resolve-tool.c

index bfd5a68fd97a394140b46e695a5489601f35f54b..f3dbaec744d4545410687bd4b874e634ed6a3da7 100644 (file)
         (i.e. classic unicast DNS), <literal>llmnr</literal> (<ulink
         url="https://tools.ietf.org/html/rfc4795">Link-Local Multicast Name Resolution</ulink>),
         <literal>llmnr-ipv4</literal>, <literal>llmnr-ipv6</literal> (LLMNR via the indicated underlying IP
-        protocols). By default the lookup is done via all protocols suitable for the lookup. If used, limits the set of
+        protocols), <literal>mdns</literal> (<ulink url="https://www.ietf.org/rfc/rfc6762.txt">Multicast DNS</ulink>),
+        <literal>mdns-ipv4</literal>, <literal>mdns-ipv6</literal> (MDNS via the indicated underlying IP protocols).
+        By default the lookup is done via all protocols suitable for the lookup. If used, limits the set of
         protocols that may be used. Use this option multiple times to enable resolving via multiple protocols at the
         same time. The setting <literal>llmnr</literal> is identical to specifying this switch once with
         <literal>llmnr-ipv4</literal> and once via <literal>llmnr-ipv6</literal>. Note that this option does not force
index 07d9582ccb243c5742835e47aff3c420d4719fc6..0c62e5b38594896770fb099a891a3ce0940a689d 100644 (file)
@@ -1524,7 +1524,7 @@ static int status_all(sd_bus *bus) {
 static void help_protocol_types(void) {
         if (arg_legend)
                 puts("Known protocol types:");
-        puts("dns\nllmnr\nllmnr-ipv4\nllmnr-ipv6");
+        puts("dns\nllmnr\nllmnr-ipv4\nllmnr-ipv6\nmdns\nmnds-ipv4\nmdns-ipv6");
 }
 
 static void help_dns_types(void) {
@@ -1722,6 +1722,12 @@ static int parse_argv(int argc, char *argv[]) {
                                 arg_flags |= SD_RESOLVED_LLMNR_IPV4;
                         else if (streq(optarg, "llmnr-ipv6"))
                                 arg_flags |= SD_RESOLVED_LLMNR_IPV6;
+                        else if (streq(optarg, "mdns"))
+                                arg_flags |= SD_RESOLVED_MDNS;
+                        else if (streq(optarg, "mdns-ipv4"))
+                                arg_flags |= SD_RESOLVED_MDNS_IPV4;
+                        else if (streq(optarg, "mdns-ipv6"))
+                                arg_flags |= SD_RESOLVED_MDNS_IPV6;
                         else {
                                 log_error("Unknown protocol specifier: %s", optarg);
                                 return -EINVAL;