]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ethernet/eth.c
Merge ../linux-2.6
[linux-2.6-omap-h63xx.git] / net / ethernet / eth.c
index 9f4dbeb59315765d8acbfcd8917484aa554f0dac..c971f14712ec207608dd48d8477516bcb9af054b 100644 (file)
@@ -95,6 +95,12 @@ int eth_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
                saddr = dev->dev_addr;
        memcpy(eth->h_source,saddr,dev->addr_len);
 
+       if(daddr)
+       {
+               memcpy(eth->h_dest,daddr,dev->addr_len);
+               return ETH_HLEN;
+       }
+       
        /*
         *      Anyway, the loopback-device should never use this function... 
         */
@@ -105,12 +111,6 @@ int eth_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
                return ETH_HLEN;
        }
        
-       if(daddr)
-       {
-               memcpy(eth->h_dest,daddr,dev->addr_len);
-               return ETH_HLEN;
-       }
-       
        return -ETH_HLEN;
 }
 
@@ -163,7 +163,7 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
        skb_pull(skb,ETH_HLEN);
        eth = eth_hdr(skb);
        
-       if (*eth->h_dest&1) {
+       if (is_multicast_ether_addr(eth->h_dest)) {
                if (!compare_ether_addr(eth->h_dest, dev->broadcast))
                        skb->pkt_type = PACKET_BROADCAST;
                else