* [PATCH 13/31] [DCCP]: Fix for follows48
@ 2007-03-20 23:13 Gerrit Renker
0 siblings, 0 replies; only message in thread
From: Gerrit Renker @ 2007-03-20 23:13 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
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>
---
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 287a040..2c5be61 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)
/* is seq1 next seqno after seq2 */
static inline int follows48(const u64 seq1, const u64 seq2)
{
- int diff = (seq1 & 0xFFFF) - (seq2 & 0xFFFF);
-
- return diff==1;
+ return dccp_delta_seqno(seq2, seq1) == 1;
}
enum {
--
1.5.0.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-20 23:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-20 23:13 [PATCH 13/31] [DCCP]: Fix for follows48 Gerrit Renker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).