diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-11 10:11:40 -0700 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-11 10:11:40 -0700 | 
| commit | 9fc282baa8f743a7049e301d13cf9968ee95a91c (patch) | |
| tree | d34e827ed35c21b98eb4e3d4c3731d1da54fa03a /net/core/dev.c | |
| parent | c61ea31dac0319ec64b33725917bda81fc293a25 (diff) | |
| parent | de02d72bb3cc5b3d4c873db4ca8291723dd48479 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  net: Fix FDDI and TR config checks in ipv4 arp and LLC.
  IPv4: unresolved multicast route cleanup
  mac80211: remove association work when processing deauth request
  ar9170: wait for asynchronous firmware loading
  ipv4: udp: fix short packet and bad checksum logging
  phy: Fix initialization in micrel driver.
  sctp: Fix a race between ICMP protocol unreachable and connect()
  veth: Dont kfree_skb() after dev_forward_skb()
  IPv6: fix IPV6_RECVERR handling of locally-generated errors
  net/gianfar: drop recycled skbs on MTU change
  iwlwifi: work around passive scan issue
Diffstat (limited to 'net/core/dev.c')
| -rw-r--r-- | net/core/dev.c | 11 | 
1 files changed, 5 insertions, 6 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index f769098774b7..264137fce3a2 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1451,7 +1451,7 @@ static inline void net_timestamp(struct sk_buff *skb)   *   * return values:   *	NET_RX_SUCCESS	(no congestion) - *	NET_RX_DROP     (packet was dropped) + *	NET_RX_DROP     (packet was dropped, but freed)   *   * dev_forward_skb can be used for injecting an skb from the   * start_xmit function of one device into the receive queue @@ -1465,12 +1465,11 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb)  {  	skb_orphan(skb); -	if (!(dev->flags & IFF_UP)) -		return NET_RX_DROP; - -	if (skb->len > (dev->mtu + dev->hard_header_len)) +	if (!(dev->flags & IFF_UP) || +	    (skb->len > (dev->mtu + dev->hard_header_len))) { +		kfree_skb(skb);  		return NET_RX_DROP; - +	}  	skb_set_dev(skb, dev);  	skb->tstamp.tv64 = 0;  	skb->pkt_type = PACKET_HOST;  | 
