diff options
author | Ian McDonald <iam4@cs.waikato.ac.nz> | 2005-08-18 20:45:29 -0300 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 16:02:03 -0700 |
commit | b1c9fe7b818acbd36dc908c5c1ad4cab34c67b39 (patch) | |
tree | 7cc9a954c01b9161e44fc90ed24692fe6d933828 /net/dccp/options.c | |
parent | d179cd12928443f3ec29cfbc3567439644bd0afc (diff) | |
download | kernel_samsung_smdk4412-b1c9fe7b818acbd36dc908c5c1ad4cab34c67b39.zip kernel_samsung_smdk4412-b1c9fe7b818acbd36dc908c5c1ad4cab34c67b39.tar.gz kernel_samsung_smdk4412-b1c9fe7b818acbd36dc908c5c1ad4cab34c67b39.tar.bz2 |
[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/options.c')
-rw-r--r-- | net/dccp/options.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/dccp/options.c b/net/dccp/options.c index d87d6be..85a86bd 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, |