X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fethernet%2Feth.c;h=c971f14712ec207608dd48d8477516bcb9af054b;hb=c57c064994f1544a5ed2e9b319ebd0bc087ea540;hp=9890fd97e538b6c9a18efb2ae068e8560d530e4b;hpb=cc918c7ab7da017bfaf9661420bb5c462e057cfb;p=linux-2.6 diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c index 9890fd97e5..c971f14712 100644 --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c @@ -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; }