From: Eric Dumazet Date: Tue, 10 Mar 2015 16:56:47 +0000 (-0700) Subject: ss: better 32bit support X-Git-Tag: v4.0.0~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e7e805d0aac4dd7a3d66951e28c0e3f457781ae;p=thirdparty%2Fiproute2.git ss: better 32bit support Socket cookies are 64bit, even if ss happens to be a 32bit binary, running on a 64 bit host. Signed-off-by: Eric Dumazet --- diff --git a/misc/ss.c b/misc/ss.c index 196b020cc..954a30bdf 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -679,9 +679,9 @@ static inline char *sock_addr_get_str(const inet_prefix *prefix) return tmp; } -static unsigned long cookie_sk_get(uint32_t *cookie) +static unsigned long long cookie_sk_get(const uint32_t *cookie) { - return (((unsigned long)cookie[1] << 31) << 1) | cookie[0]; + return (((unsigned long long)cookie[1] << 31) << 1) | cookie[0]; } static const char *sstate_name[] = {