]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/dccp/probe.c
inet: rename some inet_sock fields
[mirror_ubuntu-bionic-kernel.git] / net / dccp / probe.c
index 81368a7f5379c9907b88e64ac03fa5f23b7313f6..dc328425fa20ddfcde71163ef299b2c84f105538 100644 (file)
@@ -74,30 +74,26 @@ static void printl(const char *fmt, ...)
 static int jdccp_sendmsg(struct kiocb *iocb, struct sock *sk,
                         struct msghdr *msg, size_t size)
 {
-       const struct dccp_minisock *dmsk = dccp_msk(sk);
        const struct inet_sock *inet = inet_sk(sk);
-       const struct ccid3_hc_tx_sock *hctx;
-
-       if (dmsk->dccpms_tx_ccid == DCCPC_CCID3)
-               hctx = ccid3_hc_tx_sk(sk);
-       else
-               hctx = NULL;
-
-       if (port == 0 || ntohs(inet->dport) == port ||
-           ntohs(inet->sport) == port) {
-               if (hctx)
-                       printl("%d.%d.%d.%d:%u %d.%d.%d.%d:%u %d %d %d %d %u "
-                              "%llu %llu %d\n",
-                              NIPQUAD(inet->saddr), ntohs(inet->sport),
-                              NIPQUAD(inet->daddr), ntohs(inet->dport), size,
-                              hctx->ccid3hctx_s, hctx->ccid3hctx_rtt,
-                              hctx->ccid3hctx_p, hctx->ccid3hctx_x_calc,
-                              hctx->ccid3hctx_x_recv >> 6,
-                              hctx->ccid3hctx_x >> 6, hctx->ccid3hctx_t_ipi);
+       struct ccid3_hc_tx_sock *hc = NULL;
+
+       if (ccid_get_current_tx_ccid(dccp_sk(sk)) == DCCPC_CCID3)
+               hc = ccid3_hc_tx_sk(sk);
+
+       if (port == 0 || ntohs(inet->inet_dport) == port ||
+           ntohs(inet->inet_sport) == port) {
+               if (hc)
+                       printl("%pI4:%u %pI4:%u %d %d %d %d %u %llu %llu %d\n",
+                              &inet->inet_saddr, ntohs(inet->inet_sport),
+                              &inet->inet_daddr, ntohs(inet->inet_dport), size,
+                              hc->tx_s, hc->tx_rtt, hc->tx_p,
+                              hc->tx_x_calc, hc->tx_x_recv >> 6,
+                              hc->tx_x >> 6, hc->tx_t_ipi);
                else
-                       printl("%d.%d.%d.%d:%u %d.%d.%d.%d:%u %d\n",
-                              NIPQUAD(inet->saddr), ntohs(inet->sport),
-                              NIPQUAD(inet->daddr), ntohs(inet->dport), size);
+                       printl("%pI4:%u %pI4:%u %d\n",
+                              &inet->inet_saddr, ntohs(inet->inet_sport),
+                              &inet->inet_daddr, ntohs(inet->inet_dport),
+                              size);
        }
 
        jprobe_return();