当我通过USB与android 9.0手机共享PC互联网时,我ping 8.8.8.8工作正常,但是ping主机名(例如:google.com)却返回:ping:不知道主机xxxx.com。 当我使用android 7.1可以正常工作。 我使用“ tcpdum -vv端口53”,没有发现任何问题。当我找到libc日志时,发现:send_dg代码:
static int
send_dg(res_state statp,
const u_char *buf, int buflen, u_char *ans, int anssiz,
int *terrno, int ns, int *v_circuit, int *gotsomewhere,
time_t *at, int *rcode, int* delay)
......
if (__connect(EXT(statp).nssocks[ns], nsap, (socklen_t)nsaplen) < 0) {
......
errno = 101
发生了什么事?