]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
change meaning of +, and fix incorrect string compare
authorTCY16 <tom@nlnetlabs.nl>
Tue, 12 Jul 2022 13:22:19 +0000 (15:22 +0200)
committerTCY16 <tom@nlnetlabs.nl>
Tue, 12 Jul 2022 13:22:19 +0000 (15:22 +0200)
drill/drill.c

index f70519b7d58ac3811731601ea3fa9f595219a2fb..04b930b661ae93e751b3c02c0eef08b303869c22 100644 (file)
@@ -460,7 +460,7 @@ main(int argc, char *argv[])
                }
                /* if ^+ then it's an EDNS option */
                if (argv[i][0] == '+') {
-                       if (strstr(argv[i], "nsid")) {
+                       (strncmp(argv[i]+1, "nsid", 4))
                                ldns_edns_option *edns;
                                edns_list = ldns_edns_option_list_new();
 
@@ -479,7 +479,7 @@ main(int argc, char *argv[])
                                continue;
                        }
                        else {
-                               error("Requested EDNS option not supported");
+                               error("Unsupported argument after '+'");
                                break;
                        }
                }