summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith M Wesolowski <wesolows@foobazco.org>2014-08-05 22:08:11 +0000
committerRobert Mustacchi <rm@joyent.com>2014-11-19 13:54:55 -0800
commitb607c8a3bdb27d4fde6e3fc4bb6617a1d91bdca7 (patch)
treef17f5e3b2d873785134fdd5e80e24379817770b5
parente408e389c93d969c38d1800c3b99c9dbfe643ed5 (diff)
downloadillumos-gate-b607c8a3bdb27d4fde6e3fc4bb6617a1d91bdca7.tar.gz
5337 igb/ixgbe mishandle raw packets if cable problem
Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Dan McDonald <danmcd@nexenta.com> Reviewed by: Jason King <jason.brian.king@gmail.com> Reviewed by: Garrett D'Amore <garrett@damore.org> Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r--usr/src/uts/common/io/igb/igb_tx.c10
-rw-r--r--usr/src/uts/common/io/ixgbe/ixgbe_tx.c6
2 files changed, 11 insertions, 5 deletions
diff --git a/usr/src/uts/common/io/igb/igb_tx.c b/usr/src/uts/common/io/igb/igb_tx.c
index c86e90cae8..7a72b2ece7 100644
--- a/usr/src/uts/common/io/igb/igb_tx.c
+++ b/usr/src/uts/common/io/igb/igb_tx.c
@@ -54,12 +54,16 @@ mblk_t *
igb_tx_ring_send(void *arg, mblk_t *mp)
{
igb_tx_ring_t *tx_ring = (igb_tx_ring_t *)arg;
+ igb_t *igb;
ASSERT(tx_ring != NULL);
- if ((tx_ring->igb->igb_state & IGB_SUSPENDED) ||
- (tx_ring->igb->igb_state & IGB_ERROR) ||
- !(tx_ring->igb->igb_state & IGB_STARTED)) {
+ igb = tx_ring->igb;
+
+ if ((igb->igb_state & IGB_SUSPENDED) ||
+ (igb->igb_state & IGB_ERROR) ||
+ !(igb->igb_state & IGB_STARTED) ||
+ igb->link_state != LINK_STATE_UP) {
freemsg(mp);
return (NULL);
}
diff --git a/usr/src/uts/common/io/ixgbe/ixgbe_tx.c b/usr/src/uts/common/io/ixgbe/ixgbe_tx.c
index b235250249..798ec285d0 100644
--- a/usr/src/uts/common/io/ixgbe/ixgbe_tx.c
+++ b/usr/src/uts/common/io/ixgbe/ixgbe_tx.c
@@ -105,8 +105,10 @@ ixgbe_ring_tx(void *arg, mblk_t *mp)
if ((ixgbe->ixgbe_state & IXGBE_SUSPENDED) ||
(ixgbe->ixgbe_state & IXGBE_ERROR) ||
(ixgbe->ixgbe_state & IXGBE_OVERTEMP) ||
- !(ixgbe->ixgbe_state & IXGBE_STARTED)) {
- return (mp);
+ !(ixgbe->ixgbe_state & IXGBE_STARTED) ||
+ ixgbe->link_state != LINK_STATE_UP) {
+ freemsg(mp);
+ return (NULL);
}
copy_thresh = ixgbe->tx_copy_thresh;