Add an additional test to resolv/tst-resolv-network.c
Test for the infinite loop in getnetbyname, bug #17630.
This commit is contained in:
parent
596cc360aa
commit
ac8060265b
|
@ -1,3 +1,8 @@
|
||||||
|
2018-11-08 Alexandra Hájková <ahajkova@redhat.com>
|
||||||
|
|
||||||
|
[BZ #17630]
|
||||||
|
* resolv/tst-resolv-network.c: Add test for getnetbyname.
|
||||||
|
|
||||||
2018-11-07 Joseph Myers <joseph@codesourcery.com>
|
2018-11-07 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
[BZ #23867]
|
[BZ #23867]
|
||||||
|
|
|
@ -149,6 +149,9 @@ handle_code (const struct resolv_response_context *ctx,
|
||||||
resolv_response_add_data (b, &rrtype, sizeof (rrtype));
|
resolv_response_add_data (b, &rrtype, sizeof (rrtype));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 104:
|
||||||
|
send_ptr (b, qname, qclass, qtype, "host.example");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
FAIL_EXIT1 ("invalid QNAME: %s (code %d)", qname, code);
|
FAIL_EXIT1 ("invalid QNAME: %s (code %d)", qname, code);
|
||||||
}
|
}
|
||||||
|
@ -257,6 +260,9 @@ do_test (void)
|
||||||
"error: TRY_AGAIN\n");
|
"error: TRY_AGAIN\n");
|
||||||
check_netent ("code103.example", getnetbyname ("code103.example"),
|
check_netent ("code103.example", getnetbyname ("code103.example"),
|
||||||
"error: NO_RECOVERY\n");
|
"error: NO_RECOVERY\n");
|
||||||
|
/* Test bug #17630. */
|
||||||
|
check_netent ("code104.example", getnetbyname ("code104.example"),
|
||||||
|
"error: TRY_AGAIN\n");
|
||||||
|
|
||||||
/* Lookup by address, success cases. */
|
/* Lookup by address, success cases. */
|
||||||
check_reverse (1,
|
check_reverse (1,
|
||||||
|
|
Loading…
Reference in New Issue