macvlan.c (a4eb8b993554d374002663200bf5721f7f2ee259) | macvlan.c (e26f43faa0d79dd06e9e94829696b68b9940c2ee) |
---|---|
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 * --- 689 unchanged lines hidden (view full) --- 698static int macvlan_set_mac_address(struct net_device *dev, void *p) 699{ 700 struct macvlan_dev *vlan = netdev_priv(dev); 701 struct sockaddr *addr = p; 702 703 if (!is_valid_ether_addr(addr->sa_data)) 704 return -EADDRNOTAVAIL; 705 | 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 * --- 689 unchanged lines hidden (view full) --- 698static int macvlan_set_mac_address(struct net_device *dev, void *p) 699{ 700 struct macvlan_dev *vlan = netdev_priv(dev); 701 struct sockaddr *addr = p; 702 703 if (!is_valid_ether_addr(addr->sa_data)) 704 return -EADDRNOTAVAIL; 705 |
706 /* If the addresses are the same, this is a no-op */ 707 if (ether_addr_equal(dev->dev_addr, addr->sa_data)) 708 return 0; 709 |
|
706 if (vlan->mode == MACVLAN_MODE_PASSTHRU) { 707 dev_set_mac_address(vlan->lowerdev, addr); 708 return 0; 709 } 710 711 return macvlan_sync_address(dev, addr->sa_data); 712} 713 --- 952 unchanged lines hidden --- | 710 if (vlan->mode == MACVLAN_MODE_PASSTHRU) { 711 dev_set_mac_address(vlan->lowerdev, addr); 712 return 0; 713 } 714 715 return macvlan_sync_address(dev, addr->sa_data); 716} 717 --- 952 unchanged lines hidden --- |