Skip to content

Commit

Permalink
Corrected error where frr would be thrown out of bgp "mode" when addi…
Browse files Browse the repository at this point in the history
…ng bgp debug commands not allowing custom frr.conf commands to fall in the bgp section
  • Loading branch information
giovanni-grieco committed Nov 25, 2023
1 parent 6cae6f5 commit 812c87e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/lab-generator/make.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ function makeRouterOspfFrr(machine, lab){

function makeBgpConfFrr(router, lab) {
lab.file[router.name + "/etc/frr/daemons"] += "bgpd=yes\n";


lab.file[router.name + "/etc/frr/frr.conf"] += "debug bgp\ndebug bgp events\ndebug bgp filters\ndebug bgp fsm\ndebug bgp keepalives\ndebug bgp updates\n";
lab.file[router.name + "/etc/frr/frr.conf"] += "router bgp " + router.routing.bgp.as + "\n\n";

// Inserimento tutte le Network su cui annunciare BGP
Expand All @@ -198,9 +199,8 @@ function makeBgpConfFrr(router, lab) {
lab.file[router.name + "/etc/frr/frr.conf"] += "network " + network + "\n";
}
}

lab.file[router.name + "/etc/frr/frr.conf"] += "\n";

router.routing.bgp.remote.forEach(function (remote) {
if (remote && remote.neighbor != "" && remote.as != "") {
//Aggiungo il remote-as
Expand All @@ -217,7 +217,6 @@ function makeBgpConfFrr(router, lab) {
if (router.routing.bgp.free && router.routing.bgp.free != "")
lab.file[router.name + "/etc/frr/frr.conf"] += "\n" + router.routing.bgp.free + "\n";

lab.file[router.name + "/etc/frr/frr.conf"] += "debug bgp\ndebug bgp events\ndebug bgp filters\ndebug bgp fsm\ndebug bgp keepalives\ndebug bgp updates\n";
}

/* ------------------------------------------------------ */
Expand Down

0 comments on commit 812c87e

Please sign in to comment.