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);
}
/* real size will be set up later */
err |= gen_ldp_hdr(buf, 0);
- size = LDP_HDR_PDU_LEN;
+ size = LDP_HDR_SIZE;
first = 0;
}
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;
}