aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcelo Ricardo Leitner <[email protected]>2016-09-15 15:02:38 -0300
committerDavid S. Miller <[email protected]>2016-09-17 09:59:31 -0400
commit4496195ddd75c4ad57b783739414e69b7d79843e (patch)
treede76fff3777c7db4816d1db72ca9c74e62a597ef
parent8ab86c00e349cef9fb14719093a7f198bcc72629 (diff)
sctp: fix SSN comparision
This function actually operates on u32 yet its paramteres were declared as u16, causing integer truncation upon calling. Note in patch context that ADDIP_SERIAL_SIGN_BIT is already 32 bits. Signed-off-by: Marcelo Ricardo Leitner <[email protected]> Acked-by: Neil Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
-rw-r--r--include/net/sctp/sm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index efc01743b9d6..bafe2a0ab908 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -382,7 +382,7 @@ enum {
ADDIP_SERIAL_SIGN_BIT = (1<<31)
};
-static inline int ADDIP_SERIAL_gte(__u16 s, __u16 t)
+static inline int ADDIP_SERIAL_gte(__u32 s, __u32 t)
{
return ((s) == (t)) || (((t) - (s)) & ADDIP_SERIAL_SIGN_BIT);
}