Thread (3 messages) flat view 3 messages, 2 authors, 2018-06-27

Re: [PATCH] infiniband: i40iw, nes: don't use wall time for TCP sequence numbers

From: Arnd Bergmann <arnd@arndb.de>
Date: 2018-06-27 13:24:15
Also in: linux-rdma, lkml

On Sat, Jun 23, 2018 at 2:01 AM, Shiraz Saleem [off-list ref] wrote:
quoted
@@ -2164,7 +2165,6 @@ static struct i40iw_cm_node *i40iw_make_cm_node(
                                 struct i40iw_cm_listener *listener)
 {
      struct i40iw_cm_node *cm_node;
-     struct timespec ts;
      int oldarpindex;
      int arpindex;
      struct net_device *netdev = iwdev->netdev;
@@ -2214,8 +2214,10 @@ static struct i40iw_cm_node *i40iw_make_cm_node(
      cm_node->tcp_cntxt.rcv_wscale = I40IW_CM_DEFAULT_RCV_WND_SCALE;
      cm_node->tcp_cntxt.rcv_wnd =
                      I40IW_CM_DEFAULT_RCV_WND_SCALED >> I40IW_CM_DEFAULT_RCV_WND_SCALE;
-     ts = current_kernel_time();
-     cm_node->tcp_cntxt.loc_seq_num = ts.tv_nsec;
+     cm_node->tcp_cntxt.loc_seq_num = secure_tcp_seq(htonl(cm_node->loc_addr[0]),
+                                                     htonl(cm_node->rem_addr[0]),
+                                                     htons(cm_node->loc_port),
+                                                     htons(cm_node->rem_port));
Should we not be using secure_tcpv6_seq() when we are ipv6?
I had not realized that there is a difference, but yes, from looking
at that function it seems that we should. v2 coming now.

       Arnd
_______________________________________________
Y2038 mailing list
Y2038@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/y2038
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help