- if (lp_state & LNET_PEER_PING_FAILED) {
- CDEBUG(D_NET,
- "Ping failed with %d. Set routes down for gw %s\n",
- lp->lp_ping_error, libcfs_nid2str(lp->lp_primary_nid));
- /* If the ping failed then mark the routes served by this
- * peer down
+ spin_unlock(&lp->lp_lock);
+
+ if (lp_state & LNET_PEER_PING_FAILED ||
+ pbuf->pb_info.pi_features & LNET_PING_FEAT_RTE_DISABLED) {
+ CDEBUG(D_NET, "Set routes down for gw %s because %s %d\n",
+ libcfs_nid2str(lp->lp_primary_nid),
+ lp_state & LNET_PEER_PING_FAILED ? "ping failed" :
+ "route feature is disabled", lp->lp_ping_error);
+ /* If the ping failed or the peer has routing disabled then
+ * mark the routes served by this peer down