From: Kusanagi Kouichi <slash@ac.auone-net.jp>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org, Pavel Emelyanov <xemul@parallels.com>,
linux-kernel@vger.kernel.org
Subject: Re: Commit 8ef874bfc7296fa206eea2ad1e8a426f576bf6f6 has broken ss command
Date: Wed, 4 Apr 2012 22:22:27 +0900 [thread overview]
Message-ID: <20120404132228.3C5B262C03B@msa106.auone-net.jp> (raw)
In-Reply-To: <1333534877.18626.566.camel@edumazet-glaptop>
On 2012-04-04 12:21:17 +0200, Eric Dumazet wrote:
> Please try this patch :
>
> diff --git a/misc/ss.c b/misc/ss.c
> index 5414f75..8c00760 100644
> --- a/misc/ss.c
> +++ b/misc/ss.c
> @@ -1534,8 +1534,10 @@ static int tcp_show_netlink(struct filter *f, FILE *dump_fp, int socktype)
> .msg_iovlen = f->f ? 3 : 1,
> };
>
> - if (sendmsg(fd, &msg, 0) < 0)
> + if (sendmsg(fd, &msg, 0) < 0) {
> + close(fd);
> return -1;
> + }
>
> iov[0] = (struct iovec){
> .iov_base = buf,
> @@ -1589,6 +1591,10 @@ static int tcp_show_netlink(struct filter *f, FILE *dump_fp, int socktype)
> fprintf(stderr, "ERROR truncated\n");
> } else {
> errno = -err->error;
> + if (errno == EOPNOTSUPP) {
> + close(fd);
> + return -1;
> + }
> perror("TCPDIAG answers");
> }
> close(fd);
This patch solved the problem. Thank you!
next prev parent reply other threads:[~2012-04-04 13:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-04 9:03 Kusanagi Kouichi
2012-04-04 9:07 ` Eric Dumazet
2012-04-04 9:24 ` David Miller
2012-04-04 9:44 ` Eric Dumazet
2012-04-04 9:48 ` Eric Dumazet
2012-04-04 10:00 ` Kusanagi Kouichi
2012-04-04 10:21 ` Eric Dumazet
2012-04-04 13:22 ` Kusanagi Kouichi [this message]
2012-04-04 9:25 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120404132228.3C5B262C03B@msa106.auone-net.jp \
--to=slash@ac.auone-net.jp \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=xemul@parallels.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®