]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #3654 from opensourcerouting/6.0/fixing
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 23 Jan 2019 15:14:28 +0000 (10:14 -0500)
committerGitHub <noreply@github.com>
Wed, 23 Jan 2019 15:14:28 +0000 (10:14 -0500)
[6.0] fix vtysh pager issues & tarsource submodule support

ldpd/labelmapping.c
ospfd/ospf_vty.c

index 944f93331f002a3fb1ef6c6ae3cfaa4a6b27171f..5e1b422a41638f20612b3aa65fc4f6368a39e8da 100644 (file)
@@ -37,7 +37,7 @@ enqueue_pdu(struct nbr *nbr, uint16_t type, struct ibuf *buf, uint16_t size)
        struct ldp_hdr          *ldp_hdr;
 
        ldp_hdr = ibuf_seek(buf, 0, sizeof(struct ldp_hdr));
-       ldp_hdr->length = htons(size);
+       ldp_hdr->length = htons(size - LDP_HDR_DEAD_LEN);
        evbuf_enqueue(&nbr->tcp->wbuf, buf);
 }
 
@@ -65,7 +65,7 @@ send_labelmessage(struct nbr *nbr, uint16_t type, struct mapping_head *mh)
                        /* real size will be set up later */
                        err |= gen_ldp_hdr(buf, 0);
 
-                       size = LDP_HDR_PDU_LEN;
+                       size = LDP_HDR_SIZE;
                        first = 0;
                }
 
index fb9770d09ad9e7842c107a18558f1158ce490d68..513b437234e2aa5c535a8f31729ad058ec1eb7fe 100644 (file)
@@ -1199,14 +1199,17 @@ DEFUN (no_ospf_area_vlink,
                return CMD_WARNING_CONFIG_FAILED;
        }
 
+       vl_data = ospf_vl_lookup(ospf, area, vl_config.vl_peer);
+       if (!vl_data) {
+               vty_out(vty, "Virtual link does not exist\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+
        if (argc <= 5) {
                /* Basic VLink no command */
                /* Thats all folks! - BUGS B. strikes again!!!*/
-               if ((vl_data = ospf_vl_lookup(ospf, area, vl_config.vl_peer)))
-                       ospf_vl_delete(ospf, vl_data);
-
+               ospf_vl_delete(ospf, vl_data);
                ospf_area_check_free(ospf, vl_config.area_id);
-
                return CMD_SUCCESS;
        }