iproute2/ip
Xiao Liang a597ab156b iplink: Fix link-netns id and link ifindex
When link-netns or link-netnsid is supplied, lookup link in that netns.
And if both netns and link-netns are given, IFLA_LINK_NETNSID should be
the nsid of link-netns from the view of target netns, not from current
one.

For example, when handling:

    # ip -n ns1 link add netns ns2 link-netns ns3 link eth1 eth1.100 type vlan id 100

should lookup eth1 in ns3 and IFLA_LINK_NETNSID is the id of ns3 from
ns2.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-10-17 12:09:44 -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: Move of set_netnsid_from_name() to namespace.c 2024-10-17 12:08:08 -07:00
ip.c use missing argument helper 2024-04-23 09:01:46 -07:00
ipaddress.c ip: do not print stray prefixes in monitor mode 2024-07-17 16:48:25 -07:00
ipaddrlabel.c ip: do not print stray prefixes in monitor mode 2024-07-17 16:48:25 -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 ip: bridge: add support for mst_enabled 2024-07-08 03:33:53 +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/netkit: print peer policy 2024-08-09 14:32:46 +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 iplink: Fix link-netns id and link ifindex 2024-10-17 12:09:44 -07: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: do not print stray prefixes in monitor mode 2024-07-17 16:48:25 -07:00
ipmptcp.c ip: mptcp: 'id 0' is only for 'del' 2024-08-02 10:47:39 -07:00
ipmroute.c ip/ipmroute: use preferred_family to get prefix 2024-10-10 09:52:49 -07:00
ipneigh.c ip: do not print stray prefixes in monitor mode 2024-07-17 16:48:25 -07:00
ipnetconf.c ip: netconf: fix overzealous error checking 2024-10-11 10:35:58 -07:00
ipnetns.c ip: Move of set_netnsid_from_name() to namespace.c 2024-10-17 12:08:08 -07:00
ipnexthop.c ip: nexthop: Support 16-bit nexthop weights 2024-08-19 01:06:46 +00:00
ipntable.c ip: use SPDX 2023-01-14 09:00:34 -08:00
ipprefix.c ip: do not print stray prefixes in monitor mode 2024-07-17 16:48:25 -07:00
iproute_lwtunnel.c ip: lwtunnel: tunsrc support 2024-09-09 15:19:36 +00:00
iproute.c ip: do not print stray prefixes in monitor mode 2024-07-17 16:48:25 -07:00
iprule.c ip: do not print stray prefixes in monitor mode 2024-07-17 16:48:25 -07:00
ipseg6.c ip: use SPDX 2023-01-14 09:00:34 -08:00
ipstats.c ip: do not print stray prefixes in monitor mode 2024-07-17 16:48:25 -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 xfrm: add SA direction attribute 2024-06-04 22:53:26 +00: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: nexthop: Support 16-bit nexthop weights 2024-08-19 01:06:46 +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 xfrm: add SA direction attribute 2024-06-04 22:53:26 +00:00
xfrm.h xfrm: make xfrm_stat_print_nokeys static 2023-06-02 09:33:34 -07:00