iproute2/ip
Stephen Hemminger 0ea0699ea0 route: filter by interface on multipath routes
The ip route command would silently hide multipath routes when filter
by interface. The problem was it was not looking for interface when
filter multipath routes.

Example:
	ip link add name dummy1 up type dummy
	ip link add name dummy2 up type dummy
	ip address add 192.0.2.1/28 dev dummy1
	ip address add 192.0.2.17/28 dev dummy2
	ip route add 198.51.100.0/24 \
		nexthop via 192.0.2.2 dev dummy1 \
		nexthop via 192.0.2.18 dev dummy2

Before:
ip route show dev dummy1
192.0.2.0/28 proto kernel scope link src 192.0.2.1

After:
ip route show dev dummy1
192.0.2.0/28 proto kernel scope link src 192.0.2.1
198.51.100.0/24
	nexthop via 192.0.2.2 dev dummy1 weight 1
	nexthop via 192.0.2.18 dev dummy2 weight 1

Reported-by: "Muggeridge, Matt" <matt.muggeridge2@hpe.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-07-04 17:44:55 -07:00
..
.gitignore Another .gitignore file. 2006-08-08 12:11:23 -07:00
ila_common.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
ip6tunnel.c ip: use SPDX 2023-01-14 09:00:34 -08:00
ip_common.h ip: Support filter links with no VF info 2024-04-13 16:30:07 +00:00
ip.c use missing argument helper 2024-04-23 09:01:46 -07:00
ipaddress.c ip: Support filter links with no VF info 2024-04-13 16:30:07 +00:00
ipaddrlabel.c iproute2: optimize code and fix some mem-leak risk 2023-05-11 14:15:12 -07:00
ipfou.c iproute2: optimize code and fix some mem-leak risk 2023-05-11 14:15:12 -07:00
ipila.c ila: allow show, list and lst as synonyms 2024-03-28 13:33:05 -07:00
ipioam6.c ip: ioam6: add monitor command 2024-03-03 22:29:19 +00:00
ipl2tp.c ip: use SPDX 2023-01-14 09:00:34 -08:00
iplink_amt.c ip: use SPDX 2023-01-14 09:00:34 -08:00
iplink_bareudp.c iplink_bareudp: cleanup help message and man page 2021-02-02 14:11:32 -08:00
iplink_batadv.c ip: use SPDX 2023-01-14 09:00:34 -08:00
iplink_bond_slave.c ip: use SPDX 2023-01-14 09:00:34 -08:00
iplink_bond.c ip/bond: add coupled_control support 2024-02-07 16:26:36 +00:00
iplink_bridge_slave.c bridge: fix potential snprintf overflow 2023-09-18 11:44:55 -07:00
iplink_bridge.c iplink: bridge: Add support for bridge FDB learning limits 2023-10-19 15:36:15 +00:00
iplink_can.c ip: use SPDX 2023-01-14 09:00:34 -08:00
iplink_dsa.c ip link: add sub-command to view and change DSA conduit interface 2022-09-27 21:14:31 -06:00
iplink_dummy.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
iplink_geneve.c ip: use SPDX 2023-01-14 09:00:34 -08:00
iplink_gtp.c ip: GTP support in ip link 2022-03-20 17:40:22 -06:00
iplink_hsr.c ip link: hsr: Add support for passing information about INTERLINK device 2024-05-03 15:19:30 +00:00
iplink_ifb.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
iplink_ipoib.c ip: use SPDX 2023-01-14 09:00:34 -08:00
iplink_ipvlan.c ip: use SPDX 2023-01-14 09:00:34 -08:00
iplink_macvlan.c macvlan: Add bclim parameter 2023-03-30 09:45:54 -06:00
iplink_netdevsim.c ip: use SPDX 2023-01-14 09:00:34 -08:00
iplink_netkit.c ip, link: Add support for netkit 2023-11-22 19:27:45 +00:00
iplink_nlmon.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
iplink_rmnet.c ip: add rmnet initial support 2018-06-15 11:15:14 -07:00
iplink_team.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
iplink_vcan.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
iplink_virt_wifi.c ip/iplink_virt_wifi: add support for virt_wifi 2022-04-19 20:30:08 -06:00
iplink_vlan.c ip: use SPDX 2023-01-14 09:00:34 -08:00
iplink_vrf.c ip: use SPDX 2023-01-14 09:00:34 -08:00
iplink_vxcan.c ip: use SPDX 2023-01-14 09:00:34 -08:00
iplink_vxlan.c ip-link: add support for nolocalbypass in vxlan 2023-06-06 08:30:55 -06:00
iplink_wwan.c iplink: support for WWAN devices 2021-06-26 04:40:57 +00:00
iplink_xdp.c ip: use SPDX 2023-01-14 09:00:34 -08:00
iplink_xstats.c iplink_xstats: spelling fix in error message 2024-01-11 09:23:27 -08:00
iplink.c Merge remote-tracking branch 'main/main' into next 2024-05-03 15:40:02 +00:00
ipmacsec.c lib: utils: Introduce parse_one_of_deprecated() 2023-11-22 19:32:09 +00:00
ipmaddr.c ip: fix memory leak in 'ip maddr show' 2023-10-16 09:15:04 -07:00
ipmonitor.c ip: use SPDX 2023-01-14 09:00:34 -08:00
ipmptcp.c mptcp: add support for implicit flag 2023-05-18 09:37:11 -06:00
ipmroute.c ip: use SPDX 2023-01-14 09:00:34 -08:00
ipneigh.c ip: use SPDX 2023-01-14 09:00:34 -08:00
ipnetconf.c ip: detect errors in netconf monitor mode 2024-02-08 09:23:07 -08:00
ipnetns.c ip: detect rtnl_listen errors while monitoring netns 2024-02-08 09:25:08 -08:00
ipnexthop.c ip: ipnexthop: Allow toggling collection of nexthop group HW statistics 2024-03-15 15:03:38 +00:00
ipntable.c ip: use SPDX 2023-01-14 09:00:34 -08:00
ipprefix.c treewide: fix indentation 2023-06-05 12:49:34 -06:00
iproute_lwtunnel.c use missing argument helper 2024-04-23 09:01:46 -07:00
iproute.c route: filter by interface on multipath routes 2024-07-04 17:44:55 -07:00
iprule.c iproute2: optimize code and fix some mem-leak risk 2023-05-11 14:15:12 -07:00
ipseg6.c ip: use SPDX 2023-01-14 09:00:34 -08:00
ipstats.c ipstats: fix message reporting error 2023-05-30 12:24:32 -07:00
iptoken.c ip: use SPDX 2023-01-14 09:00:34 -08:00
iptunnel.c iptunnel: detect protocol mismatch on tunnel change 2023-04-11 09:21:50 -07:00
iptuntap.c iptuntap: use TUNDEV macro 2024-02-26 12:25:27 -08:00
ipvrf.c bpf: increase verifier verbosity when in verbose mode 2023-10-27 16:56:55 +00:00
ipxfrm.c ip: use SPDX 2023-01-14 09:00:34 -08:00
link_gre6.c ip: move get_failed blocks 2023-11-17 09:16:14 -08:00
link_gre.c ip: move get_failed blocks 2023-11-17 09:16:14 -08:00
link_ip6tnl.c ip: move get_failed blocks 2023-11-17 09:16:14 -08:00
link_iptnl.c ip: move get_failed blocks 2023-11-17 09:16:14 -08:00
link_veth.c ip: use SPDX 2023-01-14 09:00:34 -08:00
link_vti6.c ip: move get_failed blocks 2023-11-17 09:16:14 -08:00
link_vti.c ip: move get_failed blocks 2023-11-17 09:16:14 -08:00
link_xfrm.c ip: xfrm: support "external" (collect_md) mode in xfrm interfaces 2022-10-03 08:49:03 -06:00
Makefile ip, link: Add support for netkit 2023-11-22 19:27:45 +00:00
nh_common.h ip: ipnexthop: Support dumping next hop group HW stats 2024-03-15 15:03:34 +00:00
routel ip: rewrite routel in python 2021-09-06 16:31:24 -06:00
rtm_map.c ip: use SPDX 2023-01-14 09:00:34 -08:00
rtmon.c rtmon: Align usage with ip help 2024-05-13 22:23:55 -07:00
static-syms.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
tcp_metrics.c ip: use SPDX 2023-01-14 09:00:34 -08:00
tunnel.c iproute2: optimize code and fix some mem-leak risk 2023-05-11 14:15:12 -07:00
tunnel.h ip: use SPDX 2023-01-14 09:00:34 -08:00
xfrm_monitor.c ip: use SPDX 2023-01-14 09:00:34 -08:00
xfrm_policy.c ip-xfrm: accept "allow" as action in ip xfrm policy setdefault 2023-04-04 18:31:58 -07:00
xfrm_state.c fix fallthrough warnings 2023-06-28 16:32:22 -07:00
xfrm.h xfrm: make xfrm_stat_print_nokeys static 2023-06-02 09:33:34 -07:00