patch-1.3.7 linux/net/appletalk/aarp.c
Next file: linux/net/appletalk/ddp.c
Previous file: linux/net/Changes
Back to the patch index
Back to the overall index
- Lines: 82
- Date:
Wed Jul 5 14:13:04 1995
- Orig file:
v1.3.6/linux/net/appletalk/aarp.c
- Orig date:
Fri Jun 30 16:22:30 1995
diff -u --recursive --new-file v1.3.6/linux/net/appletalk/aarp.c linux/net/appletalk/aarp.c
@@ -46,7 +46,7 @@
#include <net/sock.h>
#include <net/datalink.h>
#include <net/psnap.h>
-#include <net/atalk.h>
+#include <linux/atalk.h>
#ifdef CONFIG_ATALK
/*
@@ -103,7 +103,7 @@
struct device *dev=a->dev;
int len=dev->hard_header_len+sizeof(struct elapaarp)+aarp_dl->header_length;
struct sk_buff *skb=alloc_skb(len, GFP_ATOMIC);
- struct elapaarp *eah=(struct elapaarp *)(skb->data+dev->hard_header_len+aarp_dl->header_length);
+ struct elapaarp *eah;
struct at_addr *sat=atalk_find_dev_addr(dev);
if(skb==NULL || sat==NULL)
@@ -112,10 +112,11 @@
/*
* Set up the buffer.
*/
-
+
+ skb_reserve(skb,dev->hard_header_len+aarp_dl->header_length);
+ eah = (struct elapaarp *)skb_put(skb,sizeof(struct elapaarp));
skb->arp = 1;
skb->free = 1;
- skb_put(skb,len);
skb->dev = a->dev;
/*
@@ -164,7 +165,7 @@
{
int len=dev->hard_header_len+sizeof(struct elapaarp)+aarp_dl->header_length;
struct sk_buff *skb=alloc_skb(len, GFP_ATOMIC);
- struct elapaarp *eah=(struct elapaarp *)(skb->data+dev->hard_header_len+aarp_dl->header_length);
+ struct elapaarp *eah;
if(skb==NULL)
return;
@@ -172,7 +173,9 @@
/*
* Set up the buffer.
*/
-
+
+ skb_reserve(skb,dev->hard_header_len+aarp_dl->header_length);
+ eah = (struct elapaarp *)skb_put(skb,sizeof(struct elapaarp));
skb->arp = 1;
skb->free = 1;
skb_put(skb,len);
@@ -225,7 +228,7 @@
{
int len=dev->hard_header_len+sizeof(struct elapaarp)+aarp_dl->header_length;
struct sk_buff *skb=alloc_skb(len, GFP_ATOMIC);
- struct elapaarp *eah=(struct elapaarp *)(skb->data+dev->hard_header_len+aarp_dl->header_length);
+ struct elapaarp *eah;
static char aarp_eth_multicast[ETH_ALEN]={ 0x09, 0x00, 0x07, 0xFF, 0xFF, 0xFF };
if(skb==NULL)
@@ -234,7 +237,10 @@
/*
* Set up the buffer.
*/
-
+
+ skb_reserve(skb,dev->hard_header_len+aarp_dl->header_length);
+ eah = (struct elapaarp *)skb_put(skb,sizeof(struct elapaarp));
+
skb->arp = 1;
skb->free = 1;
skb_put(skb,len);
@@ -575,8 +581,6 @@
kfree_skb(skb, FREE_READ);
return 0;
}
-
- skb_pull(skb,dev->hard_header_len);
/*
* Frame size ok ?
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this