summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ipvlan/ipvlan_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
index feb185389a87..a66ff8197008 100644
--- a/drivers/net/ipvlan/ipvlan_main.c
+++ b/drivers/net/ipvlan/ipvlan_main.c
@@ -38,6 +38,12 @@ static int ipvlan_port_create(struct net_device *dev)
netdev_err(dev, "Master is either lo or non-ether device\n");
return -EINVAL;
}
+
+ if (netif_is_macvlan_port(dev)) {
+ netdev_err(dev, "Master is a macvlan port.\n");
+ return -EBUSY;
+ }
+
port = kzalloc(sizeof(struct ipvl_port), GFP_KERNEL);
if (!port)
return -ENOMEM;