From: Christoph Paasch <christoph.paasch@uclouvain.be>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2] tcp: metrics: Handle v6/v4-mapped sockets in tcp-metrics
Date: Fri, 24 Jan 2014 00:26:38 +0100 [thread overview]
Message-ID: <20140123232638.GA5520@cpaasch-mac> (raw)
In-Reply-To: <20140123.124926.313254281273203545.davem@davemloft.net>
On 23/01/14 - 12:49:26, David Miller wrote:
> From: Christoph Paasch <christoph.paasch@uclouvain.be>
> Date: Wed, 22 Jan 2014 13:58:44 +0100
>
> > A socket may be v6/v4-mapped. In that case sk->sk_family is AF_INET6,
> > but the IP being used is actually an IPv4-address.
> > Current's tcp-metrics will thus represent it as an IPv6-address:
> >
> > root@server:~# ip tcp_metrics
> > ::ffff:10.1.1.2 age 22.920sec rtt 18750us rttvar 15000us cwnd 10
> > 10.1.1.2 age 47.970sec rtt 16250us rttvar 10000us cwnd 10
> >
> > This patch modifies the tcp-metrics so that they are able to handle the
> > v6/v4-mapped sockets correctly.
> >
> > Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
>
> Applied, but I guess you didn't look at the build warnings, nor thoroughly
> test this:
>
> > + else if (sk->sk_family = AF_INET6) {
>
> That's an assignment, not a straight test, and the compiler warns
> about it.
>
> I fixed it when I applied this, but please don't be so sloppy in the
> future.
Ouch, I'm really sorry. Thanks for fixing it.
I did actually test it and it worked, because if sk_family is not AF_INET
then it can only be AF_INET6 and so the assignment won't change sk_family
and the if condition will be true.
Anyways, I will pay more attention in the future.
Thanks!
prev parent reply other threads:[~2014-01-23 23:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-22 12:58 [PATCH net-next v2] tcp: metrics: Handle v6/v4-mapped sockets in tcp-metrics Christoph Paasch
2014-01-22 14:49 ` Eric Dumazet
2014-01-23 20:49 ` David Miller
2014-01-23 23:26 ` Christoph Paasch [this message]
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=20140123232638.GA5520@cpaasch-mac \
--to=christoph.paasch@uclouvain.be \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).