@@ -1733,7 +1733,7 @@ static void inet_addr_print(const inet_prefix *a, int port,
struct aafilter {
inet_prefix addr;
- int port;
+ long port;
unsigned int iface;
__u32 mark;
__u32 mask;
@@ -2256,7 +2256,7 @@ void *parse_hostcond(char *addr, bool is_port)
port = find_port(addr, is_port);
if (port) {
if (*port && strcmp(port, "*")) {
- if (get_integer(&a.port, port, 0)) {
+ if (get_long(&a.port, port, 0)) {
if ((a.port = xll_name_to_index(port)) <= 0)
return NULL;
}
@@ -2279,7 +2279,7 @@ void *parse_hostcond(char *addr, bool is_port)
port = find_port(addr, is_port);
if (port) {
if (*port && strcmp(port, "*")) {
- if (get_integer(&a.port, port, 0)) {
+ if (get_long(&a.port, port, 0)) {
if (strcmp(port, "kernel") == 0)
a.port = 0;
else
@@ -2335,7 +2335,7 @@ void *parse_hostcond(char *addr, bool is_port)
*port++ = 0;
if (*port && *port != '*') {
- if (get_integer(&a.port, port, 0)) {
+ if (get_long(&a.port, port, 0)) {
struct servent *se1 = NULL;
struct servent *se2 = NULL;
The aafilter struct considers the port as (usually) 32 bit signed integer. In case of a unix socket, the port is used with an inode number which is an unsigned int. In this case, the 'ss' command fails because it assumes that the value does not look like a port (<0). Here an example of command call where the inode is passed and is larger than a signed integer: ss -H -A unix_stream src :2259952798 Signed-off-by: Mathieu Schroeter <mathieu@schroetersa.ch> --- misc/ss.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)