Message ID | 1420677774-10288-1-git-send-email-vadim4j@gmail.com |
---|---|
State | Accepted, archived |
Delegated to: | stephen hemminger |
Headers | show |
On Thu, 8 Jan 2015 02:42:54 +0200 Vadim Kochan <vadim4j@gmail.com> wrote: > From: Vadim Kochan <vadim4j@gmail.com> > > When 'ss' prints UDP sockets info together with RAW sockets > e.g.: > > $ ss -a > > then UDP sockets are resolved as "ipproto-xxx". > > It was caused that dg_proto was set after printing UDP > socket info from netlink. So fixed issue by moving > setting dg_proto before printing info from Netlink. > > Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Accepted -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/misc/ss.c b/misc/ss.c index 08d210a..7c94463 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -2287,12 +2287,12 @@ static int udp_show(struct filter *f) { FILE *fp = NULL; + dg_proto = UDP_PROTO; + if (!getenv("PROC_NET_UDP") && !getenv("PROC_ROOT") && inet_show_netlink(f, NULL, IPPROTO_UDP) == 0) return 0; - dg_proto = UDP_PROTO; - if (f->families&(1<<AF_INET)) { if ((fp = net_udp_open()) == NULL) goto outerr;