sockstat was checking whether a bound address was "host 0", the lowest
host on a network, using inet_lnaof(). This only works for class A/B/C.
However, it isn't useful to bind such an address unless it is really
the unspecified address INADDR_ANY. Change the check to to use that.
Details
Details
tested on system with numerous servers
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
usr.bin/sockstat/sockstat.c | ||
---|---|---|
877 | Don't you need here (conceptually) htonl(INADDR_ANY)? |
usr.bin/sockstat/sockstat.c | ||
---|---|---|
877 | Conceptually, yes. I see several other instances of comparisons of in_addr's to INADDR_ANY in netstat and others; I had probably just looked at that. I could change it if you prefer; it's not a performance issue. |