Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=267281058c4cfd6a9a173aa957bffa58239f9656
Commit:     267281058c4cfd6a9a173aa957bffa58239f9656
Parent:     e9195d677d6f06730edd5c2a3fe3283564e39c51
Author:     Thomas Graf <[EMAIL PROTECTED]>
AuthorDate: Thu Mar 22 23:27:19 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:27:26 2007 -0700

    [TCP] westwood: Use type safe netlink interface
    
    Signed-off-by: Thomas Graf <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv4/tcp_westwood.c |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/net/ipv4/tcp_westwood.c b/net/ipv4/tcp_westwood.c
index 1f91aea..ae1026a 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,
 {
        const struct westwood *ca = inet_csk_ca(sk);
        if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) {
-               struct rtattr *rta;
-               struct tcpvegas_info *info;
-
-               rta = __RTA_PUT(skb, INET_DIAG_VEGASINFO, sizeof(*info));
-               info = RTA_DATA(rta);
-               info->tcpv_enabled = 1;
-               info->tcpv_rttcnt = 0;
-               info->tcpv_rtt = jiffies_to_usecs(ca->rtt);
-               info->tcpv_minrtt = jiffies_to_usecs(ca->rtt_min);
-       rtattr_failure: ;
+               struct tcpvegas_info info = {
+                       .tcpv_enabled = 1,
+                       .tcpv_rtt = jiffies_to_usecs(ca->rtt),
+                       .tcpv_minrtt = jiffies_to_usecs(ca->rtt_min),
+               };
+
+               nla_put(skb, INET_DIAG_VEGASINFO, sizeof(info), &info);
        }
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to