aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/dccp.h1
-rw-r--r--net/dccp/dccp.h2
-rw-r--r--net/dccp/minisocks.c1
-rw-r--r--net/dccp/options.c16
-rw-r--r--net/dccp/proto.c1
5 files changed, 0 insertions, 21 deletions
diff --git a/include/linux/dccp.h b/include/linux/dccp.h
index 3a4b96becfc4..a0441190dc71 100644
--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -512,7 +512,6 @@ struct dccp_sock {
512 struct ccid *dccps_hc_rx_ccid; 512 struct ccid *dccps_hc_rx_ccid;
513 struct ccid *dccps_hc_tx_ccid; 513 struct ccid *dccps_hc_tx_ccid;
514 struct dccp_options_received dccps_options_received; 514 struct dccp_options_received dccps_options_received;
515 struct timeval dccps_epoch;
516 enum dccp_role dccps_role:2; 515 enum dccp_role dccps_role:2;
517 __u8 dccps_hc_rx_insert_options:1; 516 __u8 dccps_hc_rx_insert_options:1;
518 __u8 dccps_hc_tx_insert_options:1; 517 __u8 dccps_hc_tx_insert_options:1;
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index 20a7bedfe996..6fbe293bb271 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -402,8 +402,6 @@ extern int dccp_insert_option(struct sock *sk, struct sk_buff *skb,
402 unsigned char option, 402 unsigned char option,
403 const void *value, unsigned char len); 403 const void *value, unsigned char len);
404 404
405extern void dccp_timestamp(const struct sock *sk, struct timeval *tv);
406
407static inline suseconds_t timeval_usecs(const struct timeval *tv) 405static inline suseconds_t timeval_usecs(const struct timeval *tv)
408{ 406{
409 return tv->tv_sec * USEC_PER_SEC + tv->tv_usec; 407 return tv->tv_sec * USEC_PER_SEC + tv->tv_usec;
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c
index e18e249ac49b..91685990d57e 100644
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -112,7 +112,6 @@ struct sock *dccp_create_openreq_child(struct sock *sk,
112 newdp->dccps_service_list = NULL; 112 newdp->dccps_service_list = NULL;
113 newdp->dccps_service = dreq->dreq_service; 113 newdp->dccps_service = dreq->dreq_service;
114 newicsk->icsk_rto = DCCP_TIMEOUT_INIT; 114 newicsk->icsk_rto = DCCP_TIMEOUT_INIT;
115 do_gettimeofday(&newdp->dccps_epoch);
116 115
117 if (dccp_feat_clone(sk, newsk)) 116 if (dccp_feat_clone(sk, newsk))
118 goto out_free; 117 goto out_free;
diff --git a/net/dccp/options.c b/net/dccp/options.c
index 439e25daa963..167415677a75 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -370,22 +370,6 @@ int dccp_insert_option_elapsed_time(struct sock *sk, struct sk_buff *skb,
370 370
371EXPORT_SYMBOL_GPL(dccp_insert_option_elapsed_time); 371EXPORT_SYMBOL_GPL(dccp_insert_option_elapsed_time);
372 372
373void dccp_timestamp(const struct sock *sk, struct timeval *tv)
374{
375 const struct dccp_sock *dp = dccp_sk(sk);
376
377 do_gettimeofday(tv);
378 tv->tv_sec -= dp->dccps_epoch.tv_sec;
379 tv->tv_usec -= dp->dccps_epoch.tv_usec;
380
381 while (tv->tv_usec < 0) {
382 tv->tv_sec--;
383 tv->tv_usec += USEC_PER_SEC;
384 }
385}
386
387EXPORT_SYMBOL_GPL(dccp_timestamp);
388
389int dccp_insert_option_timestamp(struct sock *sk, struct sk_buff *skb) 373int dccp_insert_option_timestamp(struct sock *sk, struct sk_buff *skb)
390{ 374{
391 __be32 now = htonl(((suseconds_t)ktime_to_us(ktime_get_real())) / 10); 375 __be32 now = htonl(((suseconds_t)ktime_to_us(ktime_get_real())) / 10);
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 04b59ec4f512..8d545da35262 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -172,7 +172,6 @@ int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized)
172 struct inet_connection_sock *icsk = inet_csk(sk); 172 struct inet_connection_sock *icsk = inet_csk(sk);
173 173
174 dccp_minisock_init(&dp->dccps_minisock); 174 dccp_minisock_init(&dp->dccps_minisock);
175 do_gettimeofday(&dp->dccps_epoch);
176 175
177 /* 176 /*
178 * FIXME: We're hardcoding the CCID, and doing this at this point makes 177 * FIXME: We're hardcoding the CCID, and doing this at this point makes