Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107372912
D32714.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D32714.diff
View Options
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c
--- a/usr.bin/netstat/inet.c
+++ b/usr.bin/netstat/inet.c
@@ -296,14 +296,14 @@
(
(istcp && tp->t_state == TCPS_LISTEN)
|| (af1 == AF_INET &&
- inet_lnaof(inp->inp_laddr) == INADDR_ANY)
+ inp->inp_laddr.s_addr == INADDR_ANY)
#ifdef INET6
|| (af1 == AF_INET6 &&
IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr))
#endif /* INET6 */
|| (af1 == AF_UNSPEC &&
(((inp->inp_vflag & INP_IPV4) != 0 &&
- inet_lnaof(inp->inp_laddr) == INADDR_ANY)
+ inp->inp_laddr.s_addr == INADDR_ANY)
#ifdef INET6
|| ((inp->inp_vflag & INP_IPV6) != 0 &&
IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr))
@@ -1479,24 +1479,13 @@
char *cp;
static char line[MAXHOSTNAMELEN];
struct hostent *hp;
- struct netent *np;
cp = 0;
if (!numeric_addr && inp->s_addr != INADDR_ANY) {
- int net = inet_netof(*inp);
- int lna = inet_lnaof(*inp);
-
- if (lna == INADDR_ANY) {
- np = getnetbyaddr(net, AF_INET);
- if (np)
- cp = np->n_name;
- }
- if (cp == NULL) {
- hp = gethostbyaddr((char *)inp, sizeof (*inp), AF_INET);
- if (hp) {
- cp = hp->h_name;
- trimdomain(cp, strlen(cp));
- }
+ hp = gethostbyaddr((char *)inp, sizeof (*inp), AF_INET);
+ if (hp) {
+ cp = hp->h_name;
+ trimdomain(cp, strlen(cp));
}
}
if (inp->s_addr == INADDR_ANY)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 14, 5:33 AM (20 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15791442
Default Alt Text
D32714.diff (1 KB)
Attached To
Mode
D32714: netstat: reduce use of historical Internet classes
Attached
Detach File
Event Timeline
Log In to Comment