Commit d4b81ff7 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by David S. Miller

[DCCP]: Export dccp_insert_option_timestamp to CCIDs

And don't insert a TIMESTAMP option in all packets, leave the decision
to the CCIDs.
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 012e13ea
...@@ -364,6 +364,8 @@ extern void dccp_insert_options(struct sock *sk, struct sk_buff *skb); ...@@ -364,6 +364,8 @@ extern void dccp_insert_options(struct sock *sk, struct sk_buff *skb);
extern void dccp_insert_option_elapsed_time(struct sock *sk, extern void dccp_insert_option_elapsed_time(struct sock *sk,
struct sk_buff *skb, struct sk_buff *skb,
u32 elapsed_time); u32 elapsed_time);
extern void dccp_insert_option_timestamp(struct sock *sk,
struct sk_buff *skb);
extern void dccp_insert_option(struct sock *sk, struct sk_buff *skb, extern void dccp_insert_option(struct sock *sk, struct sk_buff *skb,
unsigned char option, unsigned char option,
const void *value, unsigned char len); const void *value, unsigned char len);
......
...@@ -348,7 +348,7 @@ void dccp_insert_option_elapsed_time(struct sock *sk, ...@@ -348,7 +348,7 @@ void dccp_insert_option_elapsed_time(struct sock *sk,
(unsigned long long) DCCP_SKB_CB(skb)->dccpd_seq); (unsigned long long) DCCP_SKB_CB(skb)->dccpd_seq);
} }
EXPORT_SYMBOL(dccp_insert_option_elapsed_time); EXPORT_SYMBOL_GPL(dccp_insert_option_elapsed_time);
static void dccp_insert_option_ack_vector(struct sock *sk, struct sk_buff *skb) static void dccp_insert_option_ack_vector(struct sock *sk, struct sk_buff *skb)
{ {
...@@ -426,8 +426,7 @@ static void dccp_insert_option_ack_vector(struct sock *sk, struct sk_buff *skb) ...@@ -426,8 +426,7 @@ static void dccp_insert_option_ack_vector(struct sock *sk, struct sk_buff *skb)
(unsigned long long) ap->dccpap_ack_ackno); (unsigned long long) ap->dccpap_ack_ackno);
} }
static inline void dccp_insert_option_timestamp(struct sock *sk, void dccp_insert_option_timestamp(struct sock *sk, struct sk_buff *skb)
struct sk_buff *skb)
{ {
struct timeval tv; struct timeval tv;
u32 now; u32 now;
...@@ -441,6 +440,8 @@ static inline void dccp_insert_option_timestamp(struct sock *sk, ...@@ -441,6 +440,8 @@ static inline void dccp_insert_option_timestamp(struct sock *sk,
dccp_insert_option(sk, skb, DCCPO_TIMESTAMP, &now, sizeof(now)); dccp_insert_option(sk, skb, DCCPO_TIMESTAMP, &now, sizeof(now));
} }
EXPORT_SYMBOL_GPL(dccp_insert_option_timestamp);
static void dccp_insert_option_timestamp_echo(struct sock *sk, static void dccp_insert_option_timestamp_echo(struct sock *sk,
struct sk_buff *skb) struct sk_buff *skb)
{ {
...@@ -504,7 +505,6 @@ void dccp_insert_options(struct sock *sk, struct sk_buff *skb) ...@@ -504,7 +505,6 @@ void dccp_insert_options(struct sock *sk, struct sk_buff *skb)
DCCP_MAX_SEQNO + 1)) DCCP_MAX_SEQNO + 1))
dccp_insert_option_ack_vector(sk, skb); dccp_insert_option_ack_vector(sk, skb);
dccp_insert_option_timestamp(sk, skb);
if (dp->dccps_timestamp_echo != 0) if (dp->dccps_timestamp_echo != 0)
dccp_insert_option_timestamp_echo(sk, skb); dccp_insert_option_timestamp_echo(sk, skb);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment