diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-12 00:05:35 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-12 00:05:35 -0700 |
commit | 278554bd6579206921f5d8a523649a7a57f8850d (patch) | |
tree | 4e6c527daf0910e455b3aa72e2c96b0479e430be /net/core | |
parent | 5a147e8bf982f9dd414c1dd751fe02c1942506b2 (diff) | |
parent | cea0d767c29669bf89f86e4aee46ef462d2ebae8 (diff) | |
download | op-kernel-dev-278554bd6579206921f5d8a523649a7a57f8850d.zip op-kernel-dev-278554bd6579206921f5d8a523649a7a57f8850d.tar.gz |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/net/wireless/ath/ar9170/usb.c
drivers/scsi/iscsi_tcp.c
net/ipv4/ipmr.c
Diffstat (limited to 'net/core')
-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 32611c8..3daee30 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1470,7 +1470,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 @@ -1484,12 +1484,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; |