]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
ss: better 32bit support
authorEric Dumazet <edumazet@google.com>
Tue, 10 Mar 2015 16:56:47 +0000 (09:56 -0700)
committerStephen Hemminger <shemming@brocade.com>
Sun, 15 Mar 2015 19:11:43 +0000 (12:11 -0700)
Socket cookies are 64bit, even if ss happens to be
a 32bit binary, running on a 64 bit host.

Signed-off-by: Eric Dumazet <edumazet@google.com>
misc/ss.c

index 196b020cca77914e5df3470d06c7b3a6e4961508..954a30bdfb7091f25bae4dbb3e1b8067619cc51b 100644 (file)
--- 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[] = {