diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-18 19:16:05 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-18 19:16:05 -0400 |
| commit | 1d19f176a2884d31c4fe2c7018349ff884a819b1 (patch) | |
| tree | f0f02160cb954d3d7bd4417548ca997f0a88fd45 /net/packet/af_packet.c | |
| parent | 20bf94e266969f91c623ed8b51da4109e3f57bcb (diff) | |
| parent | fe26109a9dfd9327fdbe630fc819e1b7450986b2 (diff) | |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[ATM] CLIP: Do not refer freed skbuff in clip_mkip().
[NET]: Drop tx lock in dev_watchdog_up
[PACKET]: Don't truncate non-linear skbs with mmaped IO
[NET]: Mark frame diverter for future removal.
[NETFILTER]: Add secmark headers to header-y
[ATM]: linux-atm-general mailing list is subscribers only
[ATM]: [he] when transmit fails, unmap the dma regions
[TCP] tcp-lp: update information to MAINTAINERS
[TCP] tcp-lp: bug fix for oops in 2.6.18-rc6
[BRIDGE]: random extra bytes on STP TCN packet
[IPV6]: Accept -1 for IPV6_TCLASS
[IPV6]: Fix tclass setting for raw sockets.
[IPVS]: remove the debug option go ip_vs_ftp
[IPVS]: Make sure ip_vs_ftp ports are valid
[IPVS]: auto-help for ip_vs_ftp
[IPVS]: Document the ports option to ip_vs_ftp in kernel-parameters.txt
[TCP]: Turn ABC off.
[NEIGH]: neigh_table_clear() doesn't free stats
Diffstat (limited to 'net/packet/af_packet.c')
| -rw-r--r-- | net/packet/af_packet.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index f9cef3671593..4172a5235916 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
| @@ -626,8 +626,6 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe | |||
| 626 | if ((int)snaplen < 0) | 626 | if ((int)snaplen < 0) |
| 627 | snaplen = 0; | 627 | snaplen = 0; |
| 628 | } | 628 | } |
| 629 | if (snaplen > skb->len-skb->data_len) | ||
| 630 | snaplen = skb->len-skb->data_len; | ||
| 631 | 629 | ||
| 632 | spin_lock(&sk->sk_receive_queue.lock); | 630 | spin_lock(&sk->sk_receive_queue.lock); |
| 633 | h = (struct tpacket_hdr *)packet_lookup_frame(po, po->head); | 631 | h = (struct tpacket_hdr *)packet_lookup_frame(po, po->head); |
| @@ -644,7 +642,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe | |||
| 644 | status &= ~TP_STATUS_LOSING; | 642 | status &= ~TP_STATUS_LOSING; |
| 645 | spin_unlock(&sk->sk_receive_queue.lock); | 643 | spin_unlock(&sk->sk_receive_queue.lock); |
| 646 | 644 | ||
| 647 | memcpy((u8*)h + macoff, skb->data, snaplen); | 645 | skb_copy_bits(skb, 0, (u8*)h + macoff, snaplen); |
| 648 | 646 | ||
| 649 | h->tp_len = skb->len; | 647 | h->tp_len = skb->len; |
| 650 | h->tp_snaplen = snaplen; | 648 | h->tp_snaplen = snaplen; |
