diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 18:11:38 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 18:11:38 -0800 |
| commit | 1a0153507ffae9cf3350e76c12d441788c0191e1 (patch) | |
| tree | d05a502b4fc05202c84c1667019460c08ea088cd /net/ipv4/arp.c | |
| parent | b0683ac8928c4cf40646a6ce3eb6ffe94605acfa (diff) | |
v2.4.3.2 -> v2.4.3.3
- Hui-Fen Hsu: sis900 driver update
- NIIBE Yutaka: Super-H update
- Alan Cox: more resyncs (ARM down, but more to go)
- David Miller: network zerocopy, Sparc sync, qlogic,FC fix, etc.
- David Miller/me: get rid of various drivers hacks to do mmap
alignment behind the back of the VM layer. Create a real
protocol for it.
Diffstat (limited to 'net/ipv4/arp.c')
| -rw-r--r-- | net/ipv4/arp.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index c43892ea55a9..95f896529581 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c @@ -1,6 +1,6 @@ /* linux/net/inet/arp.c * - * Version: $Id: arp.c,v 1.90 2000/10/04 09:20:56 anton Exp $ + * Version: $Id: arp.c,v 1.96 2001/02/02 08:42:59 davem Exp $ * * Copyright (C) 1994 by Florian La Roche * @@ -590,6 +590,13 @@ int arp_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) goto out_of_mem; + if (skb_is_nonlinear(skb)) { + if (skb_linearize(skb, GFP_ATOMIC) != 0) + goto freeskb; + arp = skb->nh.arph; + arp_ptr= (unsigned char *)(arp+1); + } + switch (dev_type) { default: if (arp->ar_pro != __constant_htons(ETH_P_IP)) @@ -796,9 +803,10 @@ int arp_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) } out: - kfree_skb(skb); if (in_dev) in_dev_put(in_dev); +freeskb: + kfree_skb(skb); out_of_mem: return 0; } |
