summaryrefslogtreecommitdiff
path: root/net/dccp
diff options
context:
space:
mode:
authorIan McDonald <iam4@cs.waikato.ac.nz>2005-08-19 03:45:29 +0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-30 03:02:03 +0400
commitb1c9fe7b818acbd36dc908c5c1ad4cab34c67b39 (patch)
tree7cc9a954c01b9161e44fc90ed24692fe6d933828 /net/dccp
parentd179cd12928443f3ec29cfbc3567439644bd0afc (diff)
downloadlinux-b1c9fe7b818acbd36dc908c5c1ad4cab34c67b39.tar.xz
[DCCP]: Fix elapsed time option as per section 13.2 of spec v11
The elapsed time can be two bytes or four bytes only. Signed-off-by: Ian McDonald <iam4@cs.waikato.ac.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/options.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/dccp/options.c b/net/dccp/options.c
index d87d6be7ab10..85a86bd61f44 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -293,10 +293,7 @@ static void dccp_insert_option_ndp(struct sock *sk, struct sk_buff *skb)
static inline int dccp_elapsed_time_len(const u32 elapsed_time)
{
- return elapsed_time == 0 ? 0 :
- elapsed_time <= 0xFF ? 1 :
- elapsed_time <= 0xFFFF ? 2 :
- elapsed_time <= 0xFFFFFF ? 3 : 4;
+ return elapsed_time == 0 ? 0 : elapsed_time <= 0xFFFF ? 2 : 4;
}
void dccp_insert_option_elapsed_time(struct sock *sk,