diff options
author | Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> | 2016-09-15 15:02:38 -0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-17 09:59:31 -0400 |
commit | 4496195ddd75c4ad57b783739414e69b7d79843e (patch) | |
tree | de76fff3777c7db4816d1db72ca9c74e62a597ef /include/net/sctp/sm.h | |
parent | 8ab86c00e349cef9fb14719093a7f198bcc72629 (diff) | |
download | linux-4496195ddd75c4ad57b783739414e69b7d79843e.tar.bz2 |
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 <marcelo.leitner@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sctp/sm.h')
-rw-r--r-- | include/net/sctp/sm.h | 2 |
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); } |