diff options
Diffstat (limited to 'net/ethernet')
-rw-r--r-- | net/ethernet/eth.c | 12 |
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, | |||
95 | saddr = dev->dev_addr; | 95 | saddr = dev->dev_addr; |
96 | memcpy(eth->h_source,saddr,dev->addr_len); | 96 | memcpy(eth->h_source,saddr,dev->addr_len); |
97 | 97 | ||
98 | if(daddr) | ||
99 | { | ||
100 | memcpy(eth->h_dest,daddr,dev->addr_len); | ||
101 | return ETH_HLEN; | ||
102 | } | ||
103 | |||
98 | /* | 104 | /* |
99 | * Anyway, the loopback-device should never use this function... | 105 | * Anyway, the loopback-device should never use this function... |
100 | */ | 106 | */ |
@@ -105,12 +111,6 @@ int eth_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, | |||
105 | return ETH_HLEN; | 111 | return ETH_HLEN; |
106 | } | 112 | } |
107 | 113 | ||
108 | if(daddr) | ||
109 | { | ||
110 | memcpy(eth->h_dest,daddr,dev->addr_len); | ||
111 | return ETH_HLEN; | ||
112 | } | ||
113 | |||
114 | return -ETH_HLEN; | 114 | return -ETH_HLEN; |
115 | } | 115 | } |
116 | 116 | ||