mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
net-netlink: Add a new attribute to expose TCLASS values via netlink
commit 3ceca74966 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 <[email protected]>
CC: Murali Raja <[email protected]>
CC: Stephen Hemminger <[email protected]>
CC: Eric Dumazet <[email protected]>
CC: David S. Miller <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
1 parent
6d74eb9442
commit
06236ac372
2 files changed
+4
-3
No files matched your search
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user