aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_westwood.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2007-03-23 02:27:19 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:27:26 -0400
commit267281058c4cfd6a9a173aa957bffa58239f9656 (patch)
tree4fec6880d055c53c6d2aa2c124a7a6daa60b968b /net/ipv4/tcp_westwood.c
parente9195d677d6f06730edd5c2a3fe3283564e39c51 (diff)
[TCP] westwood: Use type safe netlink interface
Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_westwood.c')
-rw-r--r--net/ipv4/tcp_westwood.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/net/ipv4/tcp_westwood.c b/net/ipv4/tcp_westwood.c
index 1f91aeae10af..ae1026a67720 100644
--- a/net/ipv4/tcp_westwood.c
+++ b/net/ipv4/tcp_westwood.c
@@ -260,16 +260,13 @@ static void tcp_westwood_info(struct sock *sk, u32 ext,
260{ 260{
261 const struct westwood *ca = inet_csk_ca(sk); 261 const struct westwood *ca = inet_csk_ca(sk);
262 if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) { 262 if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) {
263 struct rtattr *rta; 263 struct tcpvegas_info info = {
264 struct tcpvegas_info *info; 264 .tcpv_enabled = 1,
265 265 .tcpv_rtt = jiffies_to_usecs(ca->rtt),
266 rta = __RTA_PUT(skb, INET_DIAG_VEGASINFO, sizeof(*info)); 266 .tcpv_minrtt = jiffies_to_usecs(ca->rtt_min),
267 info = RTA_DATA(rta); 267 };
268 info->tcpv_enabled = 1; 268
269 info->tcpv_rttcnt = 0; 269 nla_put(skb, INET_DIAG_VEGASINFO, sizeof(info), &info);
270 info->tcpv_rtt = jiffies_to_usecs(ca->rtt);
271 info->tcpv_minrtt = jiffies_to_usecs(ca->rtt_min);
272 rtattr_failure: ;
273 } 270 }
274} 271}
275 272