debuggers.hg

changeset 3339:d23fd69d83de

bitkeeper revision 1.1159.187.69 (41c70d63jlyWGYhaHG_UYY__odoBCw)

Better MAC-address initialisation in netback.
author kaf24@scramble.cl.cam.ac.uk
date Mon Dec 20 17:35:31 2004 +0000 (2004-12-20)
parents 361671727b96
children 8d2ea672325a fc8767574ee6
files linux-2.6.9-xen-sparse/drivers/xen/netback/interface.c
line diff
     1.1 --- a/linux-2.6.9-xen-sparse/drivers/xen/netback/interface.c	Wed Dec 15 09:55:56 2004 +0000
     1.2 +++ b/linux-2.6.9-xen-sparse/drivers/xen/netback/interface.c	Mon Dec 20 17:35:31 2004 +0000
     1.3 @@ -124,13 +124,17 @@ void netif_create(netif_be_create_t *cre
     1.4  
     1.5      dev->hard_start_xmit = netif_be_start_xmit;
     1.6      dev->get_stats       = netif_be_get_stats;
     1.7 -    memcpy(dev->dev_addr, create->mac, ETH_ALEN);
     1.8  
     1.9      /* Disable queuing. */
    1.10      dev->tx_queue_len = 0;
    1.11  
    1.12 -    /* Force a different MAC from remote end. */
    1.13 -    dev->dev_addr[2] ^= 1;
    1.14 +    /*
    1.15 +     * Initialise a dummy MAC address. We choose the numerically largest
    1.16 +     * non-broadcast address to prevent the address getting stolen by an 
    1.17 +     * Ethernet bridge for STP purposes. (FE:FF:FF:FF:FF:FF)
    1.18 +     */
    1.19 +    memset(dev->dev_addr, 0xFF, ETH_ALEN);
    1.20 +    dev->dev_addr[0] &= ~0x01;
    1.21  
    1.22      if ( (err = register_netdev(dev)) != 0 )
    1.23      {