dns-debug: support record fail packet for debugging

This commit is contained in:
Nick Peng
2022-07-31 15:49:10 +08:00
parent ab415f2ee9
commit ac042e8bee
10 changed files with 363 additions and 56 deletions

View File

@@ -524,7 +524,7 @@ int main(int argc, char *argv[])
sigemptyset(&empty_sigblock);
sigprocmask(SIG_SETMASK, &empty_sigblock, NULL);
while ((opt = getopt(argc, argv, "fhc:p:Svx")) != -1) {
while ((opt = getopt(argc, argv, "fhc:p:SvxN:")) != -1) {
switch (opt) {
case 'f':
is_forground = 1;
@@ -545,6 +545,10 @@ int main(int argc, char *argv[])
_show_version();
return 0;
break;
#ifdef DEBUG
case 'N':
return dns_packet_debug(optarg);
#endif
case 'h':
_help();
return 1;