]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - rdma/link.c
rdma: Check that port index exists before operate on link layer
[mirror_iproute2.git] / rdma / link.c
index f0eaccbb8be709578bc78597eebd348f4cda5188..d93922890bb7f1df34001f0c04ab18e7dbc4f412 100644 (file)
@@ -277,6 +277,9 @@ static int link_one_show(struct rd *rd)
                { 0 }
        };
 
+       if (!rd->port_idx)
+               return 0;
+
        return rd_exec_cmd(rd, cmds, "parameter");
 }