]> git.proxmox.com Git - mirror_iproute2.git/commit
ss: always prefer family as part of host condition to default family
authorThayne McCombs <astrothayne@gmail.com>
Tue, 2 Feb 2021 03:32:10 +0000 (20:32 -0700)
committerDavid Ahern <dsahern@kernel.org>
Fri, 5 Feb 2021 04:48:16 +0000 (21:48 -0700)
commitb7e5002456df3dd68830369b6bb9386e0a171d55
tree706dd66cd5d1fe61843a71b8a6b2c2ab266451f4
parentd10f2a4bd8f82fd009c059d40844095593f5b014
ss: always prefer family as part of host condition to default family

ss accepts an address family both with the -f option and as part of a
host condition. However, if the family in the host condition is
different than the the last -f option, then which family is actually
used depends on the order that different families are checked.

This changes parse_hostcond to check all family prefixes before parsing
the rest of the address, so that the host condition's family always has
a higher priority than the "preferred" family.

Signed-off-by: Thayne McCombs <astrothayne@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
misc/ss.c