From: Ian McDonald Date: Thu, 18 Aug 2005 23:45:29 +0000 (-0300) Subject: [DCCP]: Fix elapsed time option as per section 13.2 of spec v11 X-Git-Tag: v2.6.14-rc1~1035^2~64 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=b1c9fe7b818acbd36dc908c5c1ad4cab34c67b39;p=linux-2.6-omap-h63xx.git [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 Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller --- diff --git a/net/dccp/options.c b/net/dccp/options.c index d87d6be7ab1..85a86bd61f4 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,