Commit b00daf6a authored by vadimk's avatar vadimk Committed by Stephen Hemminger

ss: Use nl_proto_a2n for filtering by netlink proto

Now it is posible to filter by existing Netlink protos:

    ss -A netlink src uevent
    ss -A netlink src nft
    ss -A netlink src genl
Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
parent f00073e8
......@@ -1229,16 +1229,8 @@ void *parse_hostcond(char *addr)
}
if (addr[0] && strcmp(addr, "*")) {
a.addr.bitlen = 32;
if (get_u32(a.addr.data, addr, 0)) {
if (strcmp(addr, "rtnl") == 0)
a.addr.data[0] = 0;
else if (strcmp(addr, "fw") == 0)
a.addr.data[0] = 3;
else if (strcmp(addr, "tcpdiag") == 0)
a.addr.data[0] = 4;
else
return NULL;
}
if (nl_proto_a2n(&a.addr.data[0], addr) == -1)
return NULL;
}
goto out;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment