You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(interfaces): trim @link from completions (#1393)
Since #1090, iproute2 is preferred over ifconfig, however iproute2
provide the list of network interface in name@link in case an interface
is bound to another one (such as macvtap for example), while the real
interface name is not.
$ ip link show
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 48:21:0b:52:19:22 brd ff:ff:ff:ff:ff:ff
4: eth0.128@eth0: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 48:21:0b:52:19:22 brd ff:ff:ff:ff:ff:ff
bash-completion using name@link as provided by iproute2 output then
provide such name in auto completion list, leading to invalid interface
name when auto completing tcpdump arguments.
$ tcpdump -i <TAB>
eth0 eth0.128@eth0
This commit handle this use case to drop link name after name@.
$ tcpdump -i <TAB>
eth0 eth0.128
See: #1090
See: https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/tree/lib/utils.c?h=v6.15.0#n1306
0 commit comments