diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2007-03-20 12:03:47 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:26:45 -0400 |
commit | b16be51b5e5d75cec71b18ebc75f15a4734c62ad (patch) | |
tree | 2e7cd0225a4d30895d0b188c97e563de149cbe72 | |
parent | d52de17b8cf36d43a9d6977e7861a9f415541c6b (diff) |
[DCCP]: Fix for follows48
The follows48 relation identifies whether 48-bit sequence number
x is the direct successor of y. Currently, it does not handle cases
of the following type correctly:
follows48(0x(prefix)10000LL, 0x(prefix)0FFFFLL)
where prefix is an arbitrary hex sequence of up to 7 digits.
This is fixed by reusing the new dccp_delta_seqno function.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/dccp/dccp.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index 1615986a8d92..c66a4581348f 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h | |||
@@ -144,9 +144,7 @@ static inline u64 max48(const u64 seq1, const u64 seq2) | |||
144 | /* is seq1 next seqno after seq2 */ | 144 | /* is seq1 next seqno after seq2 */ |
145 | static inline int follows48(const u64 seq1, const u64 seq2) | 145 | static inline int follows48(const u64 seq1, const u64 seq2) |
146 | { | 146 | { |
147 | int diff = (seq1 & 0xFFFF) - (seq2 & 0xFFFF); | 147 | return dccp_delta_seqno(seq2, seq1) == 1; |
148 | |||
149 | return diff==1; | ||
150 | } | 148 | } |
151 | 149 | ||
152 | enum { | 150 | enum { |