mirror of https://github.com/F-Stack/f-stack.git
Fix the issue that `ff_netstat -r` can't show gateway6.
This commit is contained in:
parent
2156ba56d9
commit
bf68b4fc1b
|
@ -559,17 +559,18 @@ routename(struct sockaddr *sa, int flags)
|
|||
#ifdef INET
|
||||
case AF_INET:
|
||||
src = &satosin(sa)->sin_addr;
|
||||
inet_ntop(sa->sa_family, src, line, sizeof(line) - 1);
|
||||
break;
|
||||
#endif /* INET */
|
||||
#ifdef INET6
|
||||
case AF_INET6:
|
||||
src = &satosin6(sa)->sin6_addr;
|
||||
inet_ntop(AF_INET6_LINUX, src, line, sizeof(line) - 1);
|
||||
break;
|
||||
#endif /* INET6 */
|
||||
default:
|
||||
return(line);
|
||||
}
|
||||
inet_ntop(sa->sa_family, src, line, sizeof(line) - 1);
|
||||
return (line);
|
||||
}
|
||||
trimdomain(line, strlen(line));
|
||||
|
|
Loading…
Reference in New Issue