hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/net/rtnetlink.h
....@@ -33,6 +33,7 @@
3333 *
3434 * @list: Used internally
3535 * @kind: Identifier
36
+ * @netns_refund: Physical device, move to init_net on netns exit
3637 * @maxtype: Highest device specific netlink attribute number
3738 * @policy: Netlink policy for device specific attribute validation
3839 * @validate: Optional validation function for netlink/changelink parameters
....@@ -64,6 +65,7 @@
6465 size_t priv_size;
6566 void (*setup)(struct net_device *dev);
6667
68
+ bool netns_refund;
6769 unsigned int maxtype;
6870 const struct nla_policy *policy;
6971 int (*validate)(struct nlattr *tb[],
....@@ -159,12 +161,14 @@
159161 struct net_device *rtnl_create_link(struct net *net, const char *ifname,
160162 unsigned char name_assign_type,
161163 const struct rtnl_link_ops *ops,
162
- struct nlattr *tb[]);
164
+ struct nlattr *tb[],
165
+ struct netlink_ext_ack *extack);
163166 int rtnl_delete_link(struct net_device *dev);
164167 int rtnl_configure_link(struct net_device *dev, const struct ifinfomsg *ifm);
165168
166169 int rtnl_nla_parse_ifla(struct nlattr **tb, const struct nlattr *head, int len,
167170 struct netlink_ext_ack *exterr);
171
+struct net *rtnl_get_net_ns_capable(struct sock *sk, int netnsid);
168172
169173 #define MODULE_ALIAS_RTNL_LINK(kind) MODULE_ALIAS("rtnl-link-" kind)
170174