summaryrefslogtreecommitdiff
path: root/net/ethernet/eth.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-02-23 20:40:17 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-23 20:40:17 -0800
commitc0eea79bd2adcc4708973fdbf72a0a292aa60d71 (patch)
tree5736f242252532e65098e13398c9609f256de548 /net/ethernet/eth.c
parentadb9c9ac2e82ddbae4f635a9488ea4ee0a88feb6 (diff)
parent35eaa31e5d6b0653c11b5661572152295b45b7a7 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/ethernet/eth.c')
-rw-r--r--net/ethernet/eth.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index 9890fd97e538..c971f14712ec 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;
}