diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-12 03:05:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-12 03:05:35 -0400 |
commit | 278554bd6579206921f5d8a523649a7a57f8850d (patch) | |
tree | 4e6c527daf0910e455b3aa72e2c96b0479e430be /net/core | |
parent | 5a147e8bf982f9dd414c1dd751fe02c1942506b2 (diff) | |
parent | cea0d767c29669bf89f86e4aee46ef462d2ebae8 (diff) |
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 32611c8f1219..3daee30a7c82 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1470,7 +1470,7 @@ static inline void net_timestamp(struct sk_buff *skb) | |||
1470 | * | 1470 | * |
1471 | * return values: | 1471 | * return values: |
1472 | * NET_RX_SUCCESS (no congestion) | 1472 | * NET_RX_SUCCESS (no congestion) |
1473 | * NET_RX_DROP (packet was dropped) | 1473 | * NET_RX_DROP (packet was dropped, but freed) |
1474 | * | 1474 | * |
1475 | * dev_forward_skb can be used for injecting an skb from the | 1475 | * dev_forward_skb can be used for injecting an skb from the |
1476 | * start_xmit function of one device into the receive queue | 1476 | * 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) | |||
1484 | { | 1484 | { |
1485 | skb_orphan(skb); | 1485 | skb_orphan(skb); |
1486 | 1486 | ||
1487 | if (!(dev->flags & IFF_UP)) | 1487 | if (!(dev->flags & IFF_UP) || |
1488 | return NET_RX_DROP; | 1488 | (skb->len > (dev->mtu + dev->hard_header_len))) { |
1489 | 1489 | kfree_skb(skb); | |
1490 | if (skb->len > (dev->mtu + dev->hard_header_len)) | ||
1491 | return NET_RX_DROP; | 1490 | return NET_RX_DROP; |
1492 | 1491 | } | |
1493 | skb_set_dev(skb, dev); | 1492 | skb_set_dev(skb, dev); |
1494 | skb->tstamp.tv64 = 0; | 1493 | skb->tstamp.tv64 = 0; |
1495 | skb->pkt_type = PACKET_HOST; | 1494 | skb->pkt_type = PACKET_HOST; |