]> git.proxmox.com Git - mirror_iproute2.git/commit
ss: Make leading ":" always optional for sport and dport
authorThayne McCombs <astrothayne@gmail.com>
Sun, 14 Feb 2021 08:09:13 +0000 (01:09 -0700)
committerDavid Ahern <dsahern@kernel.org>
Mon, 15 Feb 2021 05:09:37 +0000 (22:09 -0700)
commitc7897ec2a68b444b8aecc7aaeed8b80a5eefa7ea
treee242795053e015ae6da3d0c53d64dfe31779b298
parent33e2471e8f47a532123ee2642e97b6a425ac84ac
ss: Make leading ":" always optional for sport and dport

The sport and dport conditions in expressions were inconsistent on
whether there should be a ":" at the beginning of the port when only a
port was provided depending on the family. The link and netlink
families required a ":" to work. The vsock family required the ":"
to be absent. The inet and inet6 families work with or without a leading
":".

This makes the leading ":" optional in all cases, so if sport or dport
are used, then it works with a leading ":" or without one, as inet and
inet6 did.

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