]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/tcp_vegas.c
[SK_BUFF]: Introduce skb_copy_to_linear_data{_offset}
[linux-2.6-omap-h63xx.git] / net / ipv4 / tcp_vegas.c
index 5c484dceb9675b7563dcf41faeb58eb38d17742c..87e72bef6d0819cd906a20a215029b35b18e3f2c 100644 (file)
@@ -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);
        }
 }