aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ipvlan/ipvlan_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ipvlan/ipvlan_main.c')
-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)
38 netdev_err(dev, "Master is either lo or non-ether device\n"); 38 netdev_err(dev, "Master is either lo or non-ether device\n");
39 return -EINVAL; 39 return -EINVAL;
40 } 40 }
41
42 if (netif_is_macvlan_port(dev)) {
43 netdev_err(dev, "Master is a macvlan port.\n");
44 return -EBUSY;
45 }
46
41 port = kzalloc(sizeof(struct ipvl_port), GFP_KERNEL); 47 port = kzalloc(sizeof(struct ipvl_port), GFP_KERNEL);
42 if (!port) 48 if (!port)
43 return -ENOMEM; 49 return -ENOMEM;