Commit 26728105 authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller

[TCP] westwood: Use type safe netlink interface

Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e9195d67
...@@ -260,16 +260,13 @@ static void tcp_westwood_info(struct sock *sk, u32 ext, ...@@ -260,16 +260,13 @@ static void tcp_westwood_info(struct sock *sk, u32 ext,
{ {
const struct westwood *ca = inet_csk_ca(sk); const struct westwood *ca = inet_csk_ca(sk);
if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) { if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) {
struct rtattr *rta; struct tcpvegas_info info = {
struct tcpvegas_info *info; .tcpv_enabled = 1,
.tcpv_rtt = jiffies_to_usecs(ca->rtt),
rta = __RTA_PUT(skb, INET_DIAG_VEGASINFO, sizeof(*info)); .tcpv_minrtt = jiffies_to_usecs(ca->rtt_min),
info = RTA_DATA(rta); };
info->tcpv_enabled = 1;
info->tcpv_rttcnt = 0; nla_put(skb, INET_DIAG_VEGASINFO, sizeof(info), &info);
info->tcpv_rtt = jiffies_to_usecs(ca->rtt);
info->tcpv_minrtt = jiffies_to_usecs(ca->rtt_min);
rtattr_failure: ;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment