diff options
author | 2018-01-29 12:23:53 -0500 | |
---|---|---|
committer | 2018-01-29 12:23:53 -0500 | |
commit | e8368d9ebb9413ee9c24c91f0a48d39c764c242c (patch) | |
tree | 4c8fa3f46034244bb2e5eaa7cc1258b0ae427c68 /include | |
parent | net: ethernet: cavium: Correct Cavium Thunderx NIC driver names accordingly to module name (diff) | |
parent | dev: advertise the new ifindex when the netns iface changes (diff) | |
download | wireguard-linux-e8368d9ebb9413ee9c24c91f0a48d39c764c242c.tar.xz wireguard-linux-e8368d9ebb9413ee9c24c91f0a48d39c764c242c.zip |
Merge branch 'net-Ease-to-follow-an-interface-that-moves-to-another-netns'
Nicolas Dichtel says:
====================
net: Ease to follow an interface that moves to another netns
The goal of this series is to ease the user to follow an interface that
moves to another netns.
After this series, with a patched iproute2:
$ ip netns
bar
foo
$ ip monitor link &
$ ip link set dummy0 netns foo
Deleted 5: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default
link/ether 6e:a7:82:35:96:46 brd ff:ff:ff:ff:ff:ff new-nsid 0 new-ifindex 6
=> new nsid: 0, new ifindex: 6 (was 5 in the previous netns)
$ ip link set eth1 netns bar
Deleted 3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default
link/ether 52:54:01:12:34:57 brd ff:ff:ff:ff:ff:ff new-nsid 1 new-ifindex 3
=> new nsid: 1, new ifindex: 3 (same ifindex)
$ ip netns
bar (id: 1)
foo (id: 0)
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | include/linux/rtnetlink.h | 5 | ||||
-rw-r--r-- | include/uapi/linux/if_link.h | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 62d508b31f56..0514cc36ac34 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h @@ -19,10 +19,11 @@ extern int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change, gfp_t flags); void rtmsg_ifinfo_newnet(int type, struct net_device *dev, unsigned int change, - gfp_t flags, int *new_nsid); + gfp_t flags, int *new_nsid, int new_ifindex); struct sk_buff *rtmsg_ifinfo_build_skb(int type, struct net_device *dev, unsigned change, u32 event, - gfp_t flags, int *new_nsid); + gfp_t flags, int *new_nsid, + int new_ifindex); void rtmsg_ifinfo_send(struct sk_buff *skb, struct net_device *dev, gfp_t flags); diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index 8616131e2c61..6d9447700e18 100644 --- a/include/uapi/linux/if_link.h +++ b/include/uapi/linux/if_link.h @@ -163,6 +163,7 @@ enum { IFLA_IF_NETNSID, IFLA_CARRIER_UP_COUNT, IFLA_CARRIER_DOWN_COUNT, + IFLA_NEW_IFINDEX, __IFLA_MAX }; |