From: "Maciej Żenczykowski" <zenczykowski@gmail.com>
To: "Maciej Żenczykowski" <maze@google.com>
Cc: netdev@vger.kernel.org, "Maciej Żenczykowski" <maze@google.com>,
"Murali Raja" <muralira@google.com>,
"Stephen Hemminger" <shemminger@vyatta.com>,
"Eric Dumazet" <eric.dumazet@gmail.com>,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH] net-netlink: Add a new attribute to expose TCLASS values via netlink
Date: Mon, 7 Nov 2011 16:23:11 -0800 [thread overview]
Message-ID: <1320711791-11005-1-git-send-email-zenczykowski@gmail.com> (raw)
From: Maciej Żenczykowski <maze@google.com>
commit 3ceca749668a52bd795585e0f71c6f0b04814f7b added a TOS attribute.
Unfortunately TOS and TCLASS are both present in a dual-stack v6 socket,
furthermore they can have different values. As such one cannot in a
sane way expose both through a single attribute.
Signed-off-by: Maciej Żenczyowski <maze@google.com>
CC: Murali Raja <muralira@google.com>
CC: Stephen Hemminger <shemminger@vyatta.com>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: David S. Miller <davem@davemloft.net>
---
include/linux/inet_diag.h | 3 ++-
net/ipv4/inet_diag.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/linux/inet_diag.h b/include/linux/inet_diag.h
index 80b480c..abf5028 100644
--- a/include/linux/inet_diag.h
+++ b/include/linux/inet_diag.h
@@ -98,9 +98,10 @@ enum {
INET_DIAG_VEGASINFO,
INET_DIAG_CONG,
INET_DIAG_TOS,
+ INET_DIAG_TCLASS,
};
-#define INET_DIAG_MAX INET_DIAG_TOS
+#define INET_DIAG_MAX INET_DIAG_TCLASS
/* INET_DIAG_MEM */
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index f5e2bda..68e8ac5 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -133,8 +133,8 @@ static int inet_csk_diag_fill(struct sock *sk,
&np->rcv_saddr);
ipv6_addr_copy((struct in6_addr *)r->id.idiag_dst,
&np->daddr);
- if (ext & (1 << (INET_DIAG_TOS - 1)))
- RTA_PUT_U8(skb, INET_DIAG_TOS, np->tclass);
+ if (ext & (1 << (INET_DIAG_TCLASS - 1)))
+ RTA_PUT_U8(skb, INET_DIAG_TCLASS, np->tclass);
}
#endif
--
1.7.3.1
next reply other threads:[~2011-11-08 0:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-08 0:23 Maciej Żenczykowski [this message]
2011-11-08 0:25 ` [PATCH] net-netlink: Add a new attribute to expose TCLASS values via netlink Maciej Żenczykowski
2011-11-08 0:27 ` Stephen Hemminger
2011-11-08 0:29 ` Maciej Żenczykowski
2011-11-08 1:46 ` [PATCH] [RFC] net-netlink: fix tos/tclass for dual-stack ipv6 sockets Maciej Żenczykowski
2011-11-09 20:35 ` David Miller
2011-11-10 1:52 ` Maciej Żenczykowski
2011-11-09 20:34 ` [PATCH] net-netlink: Add a new attribute to expose TCLASS values via netlink David Miller
2011-11-10 1:50 ` Maciej Żenczykowski
2011-11-10 1:53 ` David Miller
[not found] ` <CAHo-OoybYpiusVFbDLEhS2ayPOVC1sXt7WZvpgW-Fk7ZqKj+SQ@mail.gmail.com>
[not found] ` <20111114.010752.2129864130433732501.davem@davemloft.net>
2011-11-15 6:13 ` Maciej Żenczykowski
2011-11-22 1:50 ` [PATCH] net-netlink: fix diag to export IPv4 tos for dual-stack IPv6 sockets Maciej Żenczykowski
2011-11-22 1:52 ` Maciej Żenczykowski
2011-11-22 21:03 ` David Miller
2011-11-22 21:03 ` 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=1320711791-11005-1-git-send-email-zenczykowski@gmail.com \
--to=zenczykowski@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=maze@google.com \
--cc=muralira@google.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.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;
as well as URLs for NNTP newsgroup(s).