diff --git a/src/drivers/net/ipoib.c b/src/drivers/net/ipoib.c index 52ac5f03..09c89bdc 100644 --- a/src/drivers/net/ipoib.c +++ b/src/drivers/net/ipoib.c @@ -485,6 +485,7 @@ static void ipoib_complete_recv ( struct ib_device *ibdev __unused, struct ipoib_mac ll_src; struct ipoib_peer *src; + /* Record errors */ if ( rc != 0 ) { netdev_rx_err ( netdev, iobuf, rc ); return; @@ -499,6 +500,12 @@ static void ipoib_complete_recv ( struct ib_device *ibdev __unused, return; } ipoib_hdr = iobuf->data; + if ( ! av ) { + DBGC ( ipoib, "IPoIB %p received packet without address " + "vector\n", ipoib ); + netdev_rx_err ( netdev, iobuf, -ENOTTY ); + return; + } /* Parse source address */ if ( av->gid_present ) { diff --git a/src/include/ipxe/infiniband.h b/src/include/ipxe/infiniband.h index fc04dc87..be2b6e78 100644 --- a/src/include/ipxe/infiniband.h +++ b/src/include/ipxe/infiniband.h @@ -135,6 +135,7 @@ enum ib_queue_pair_type { IB_QPT_GSI, IB_QPT_UD, IB_QPT_RC, + IB_QPT_ETH, }; /** An Infiniband Queue Pair */ diff --git a/src/net/infiniband.c b/src/net/infiniband.c index 20734271..bdfc45d6 100644 --- a/src/net/infiniband.c +++ b/src/net/infiniband.c @@ -483,7 +483,7 @@ void ib_complete_send ( struct ib_device *ibdev, struct ib_queue_pair *qp, * * @v ibdev Infiniband device * @v qp Queue pair - * @v av Address vector + * @v av Address vector, or NULL * @v iobuf I/O buffer * @v rc Completion status code */