@@ -1791,6 +1791,13 @@ static int geneve_fill_info(struct sk_buff *skb, const struct net_device *dev)
return -EMSGSIZE;
}
+static struct net *geneve_get_link_net(const struct net_device *dev)
+{
+ struct geneve_dev *geneve = netdev_priv(dev);
+
+ return geneve->net;
+}
+
static struct rtnl_link_ops geneve_link_ops __read_mostly = {
.kind = "geneve",
.maxtype = IFLA_GENEVE_MAX,
@@ -1803,6 +1810,7 @@ static struct rtnl_link_ops geneve_link_ops __read_mostly = {
.dellink = geneve_dellink,
.get_size = geneve_get_size,
.fill_info = geneve_fill_info,
+ .get_link_net = geneve_get_link_net,
};
struct net_device *geneve_dev_create_fb(struct net *net, const char *name,
Currently, geneve devices don't advertise a link netns. Similarly to VXLAN, we can get it from geneve_dev->net. Fixes: 2d07dc79fe04 ("geneve: add initial netdev driver for GENEVE tunnels") Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> --- drivers/net/geneve.c | 8 ++++++++ 1 file changed, 8 insertions(+)