I did some tests for determining netstat issue.

1. I've just rebuilt the whole system on working machine with netstat
problem. Now it's 6.0-stable amd64 MP kernel+world.
The same output of "netstat -p tcp" as before... No any TCP connections
listed.
FYI, I have a lot of lan/wlan adapters installed on that machine:
lo0, bge0, bge1, enc0, athn0 (usb wifi adapter with AR9280+AR7010 ICs),
ppp0, tun0, pflog0

2. I've installed OpenBSD 6.0 amd64 MP from scratch (from official CD)
onto virtual machine with emulated Intel Ethernet adapter - em0. All
other adapter is the same:
lo0, enc0, pflog0

"netstat -p tcp" shows all TCP connections as expected.

It looks like netstat functionality depends on lan/wlan adapter present.

Can it be fixed?

Thanks.

On 25.01.2017 21:05, Kapfhammer, Stefan wrote:
> Works as expected with 6.0 stable ‎on amd64 MP kernel.
>
>
> Freundliche Grüße / Regards
> -stefan kapfhammer
>   Originalnachricht
> Von: Denis Lapshin
> Gesendet: Mittwoch, 25. Januar 2017 21:13
> An: misc@openbsd.org
> Betreff: OpenBSD 6.0 "netstat -p proto" behavior
>
>
> On a regular basis I'm using # netstat -p proto command.
>
> On 5.4 it returns:
>
> # netstat -p tcp
> Active Internet connections (including servers)
> Proto   Recv-Q Send-Q  Local Address          Foreign Address        (state)
> tcp          0     44  127.0.0.1.8888         192.168.1.37.25253
> ESTABLISHED
> tcp          0      0  127.0.0.1.9911          77.88.42.32.11.64385
> ESTABLISHED
> tcp          0      0  82.32.11.11.48279     208.242.56.59.443
> ESTABLISHED
> tcp          0      0  127.0.0.1.7110         *.*                    LISTEN
> ...
>
> On 6.0 it seems to be "-p" option is not affected onto output at all
> (the same data is provided by clear # netstat utility call):
>
> # netstat -p tcp
> Name    Mtu   Network     Address              Ipkts Ierrs    Opkts
> Oerrs Colls
> lo0     32768 <Link>                          196530     0   196530
> 0     0
> lo0     32768 ::1/128     ::1                 196530     0   196530
> 0     0
> lo0     32768 fe80::%lo0/ fe80::1%lo0         196530     0   196530
> 0     0
> lo0     32768 127/8       127.0.0.1           196530     0   196530
> 0     0
> bge0    1500  <Link>      00:02:b6:42:ea:c0    70224     0    95117
> 0     0
> pflog0  33144 <Link>                               0     0      250
> 0     0
> ...
>
> What I'm doing wrong?
>
> Thanks.

Reply via email to