macvlan.c (266e83474c98e9f18d31f4837cfe05819a660d32) | macvlan.c (787381415cf967c5d6d1d7c5b5bd893376945edd) |
---|---|
1/* 2 * Copyright (c) 2007 Patrick McHardy <kaber@trash.net> 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License as 6 * published by the Free Software Foundation; either version 2 of 7 * the License, or (at your option) any later version. 8 * --- 323 unchanged lines hidden (view full) --- 332 333static int macvlan_open(struct net_device *dev) 334{ 335 struct macvlan_dev *vlan = netdev_priv(dev); 336 struct net_device *lowerdev = vlan->lowerdev; 337 int err; 338 339 if (vlan->port->passthru) { | 1/* 2 * Copyright (c) 2007 Patrick McHardy <kaber@trash.net> 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License as 6 * published by the Free Software Foundation; either version 2 of 7 * the License, or (at your option) any later version. 8 * --- 323 unchanged lines hidden (view full) --- 332 333static int macvlan_open(struct net_device *dev) 334{ 335 struct macvlan_dev *vlan = netdev_priv(dev); 336 struct net_device *lowerdev = vlan->lowerdev; 337 int err; 338 339 if (vlan->port->passthru) { |
340 if (!(vlan->flags & MACVLAN_FLAG_NOPROMISC)) 341 dev_set_promiscuity(lowerdev, 1); | 340 if (!(vlan->flags & MACVLAN_FLAG_NOPROMISC)) { 341 err = dev_set_promiscuity(lowerdev, 1); 342 if (err < 0) 343 goto out; 344 } |
342 goto hash_add; 343 } 344 345 err = -EBUSY; 346 if (macvlan_addr_busy(vlan->port, dev->dev_addr)) 347 goto out; 348 349 err = dev_uc_add(lowerdev, dev->dev_addr); --- 674 unchanged lines hidden --- | 345 goto hash_add; 346 } 347 348 err = -EBUSY; 349 if (macvlan_addr_busy(vlan->port, dev->dev_addr)) 350 goto out; 351 352 err = dev_uc_add(lowerdev, dev->dev_addr); --- 674 unchanged lines hidden --- |