diff options
author | Thomas Graf <tgraf@suug.ch> | 2007-03-22 23:27:01 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-25 22:27:26 -0700 |
commit | e9195d677d6f06730edd5c2a3fe3283564e39c51 (patch) | |
tree | a2738b22d959eeb2091d322c493c8f293a0820d7 | |
parent | 51057f2fecff1c520b083c5ac9229e7aebce9e01 (diff) | |
download | op-kernel-dev-e9195d677d6f06730edd5c2a3fe3283564e39c51.zip op-kernel-dev-e9195d677d6f06730edd5c2a3fe3283564e39c51.tar.gz |
[TCP] vegas: Use type safe netlink interface
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/tcp_vegas.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c index 5c484dc..87e72be 100644 --- a/net/ipv4/tcp_vegas.c +++ b/net/ipv4/tcp_vegas.c @@ -341,16 +341,14 @@ static void tcp_vegas_get_info(struct sock *sk, u32 ext, { const struct vegas *ca = inet_csk_ca(sk); if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) { - struct tcpvegas_info *info; - - info = RTA_DATA(__RTA_PUT(skb, INET_DIAG_VEGASINFO, - sizeof(*info))); - - info->tcpv_enabled = ca->doing_vegas_now; - info->tcpv_rttcnt = ca->cntRTT; - info->tcpv_rtt = ca->baseRTT; - info->tcpv_minrtt = ca->minRTT; - rtattr_failure: ; + struct tcpvegas_info info = { + .tcpv_enabled = ca->doing_vegas_now, + .tcpv_rttcnt = ca->cntRTT, + .tcpv_rtt = ca->baseRTT, + .tcpv_minrtt = ca->minRTT, + }; + + nla_put(skb, INET_DIAG_VEGASINFO, sizeof(info), &info); } } |