summaryrefslogtreecommitdiff
path: root/drivers/net/vxlan/vxlan_vnifilter.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/vxlan/vxlan_vnifilter.c')
-rw-r--r--drivers/net/vxlan/vxlan_vnifilter.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/vxlan/vxlan_vnifilter.c b/drivers/net/vxlan/vxlan_vnifilter.c
index 9f28d0b6a6b2..3e04af4c5daa 100644
--- a/drivers/net/vxlan/vxlan_vnifilter.c
+++ b/drivers/net/vxlan/vxlan_vnifilter.c
@@ -425,6 +425,12 @@ static int vxlan_vnifilter_dump(struct sk_buff *skb, struct netlink_callback *cb
err = -ENODEV;
goto out_err;
}
+ if (!netif_is_vxlan(dev)) {
+ NL_SET_ERR_MSG(cb->extack,
+ "The device is not a vxlan device");
+ err = -EINVAL;
+ goto out_err;
+ }
err = vxlan_vnifilter_dump_dev(dev, skb, cb);
/* if the dump completed without an error we return 0 here */
if (err != -EMSGSIZE)