tree 7cc9a954c01b9161e44fc90ed24692fe6d933828
parent d179cd12928443f3ec29cfbc3567439644bd0afc
author Ian McDonald <[EMAIL PROTECTED]> Fri, 19 Aug 2005 02:45:29 -0300
committer David S. Miller <[EMAIL PROTECTED]> Tue, 30 Aug 2005 06:02:03 -0700

[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 <[EMAIL PROTECTED]>
Signed-off-by: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>

 net/dccp/options.c |    5 +----
 1 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/net/dccp/options.c b/net/dccp/options.c
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -293,10 +293,7 @@ static void dccp_insert_option_ndp(struc
 
 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,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to