]> git.proxmox.com Git - mirror_iproute2.git/commit - misc/ss.c
iproute: Fix Netid value for multi-families output
authorPavel Emelyanov <xemul@parallels.com>
Tue, 28 Jan 2014 06:24:15 +0000 (10:24 +0400)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 10 Feb 2014 22:47:54 +0000 (14:47 -0800)
commit77a8ca81189197e8d5e75fe19951efd0aea337d5
tree9d5c350f1e4f6670233ecda85c7a657b368ffd54
parentc33049044eabbc78645177b6bcfe94fbfa75e8ce
iproute: Fix Netid value for multi-families output

When requesting simultaneous output of TCP and UDP sockets
the netid field shows "tcp" always.

[root@xemvm1 iproute2]# ./misc/ss -a -tu
Netid State      Recv-Q Send-Q                            Local Address:Port                                Peer Address:Port
tcp   UNCONN     0      0                                             *:32713                                          *:*
tcp   UNCONN     0      0                                             *:bootpc                                         *:*
tcp   UNCONN     0      0                                            :::57879                                         :::*
tcp   LISTEN     0      128                                           *:ssh                                            *:*
tcp   ESTAB      0      48                                      1.2.3.5:ssh                                      1.2.3.4:45826
tcp   ESTAB      0      0                                       1.2.3.5:ssh                                      1.2.3.4:45814
tcp   LISTEN     0      128                                          :::ssh                                           :::*

While the 1st 3 sockets are UDP ones:

[root@xemvm1 iproute2]# ./misc/ss -a -u
State       Recv-Q Send-Q                              Local Address:Port                                  Peer Address:Port
UNCONN      0      0                                               *:32713                                            *:*
UNCONN      0      0                                               *:bootpc                                           *:*
UNCONN      0      0                                              :::57879                                           :::*

Reported-by: François-Xavier Le Bail <fx.lebail@yahoo.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Tested-by: François-Xavier Le Bail <fx.lebail@yahoo.com>
misc/ss.c