The FRRouting Protocol Suite
Find a file
Chirag Shah 934c84a02b tools: fix peer-group deletion in frr-reload
All of peers and respective configs are wiped out when
pee-group is removed.

In an attempt to remove peer-group and its associated peers
configs via frr-reload fails if the peer-group is removed first.

To pass the peer-group config removal via frr-reload following
steps are taken:
Find the bgp context to which peer-group belongs.
Find the peer-group associated peer(s) and store them in a list.
Remove the peers config lines from the pending list.
Move the peer-group deletion line to end of the pending list so
any remaining peer-group associated config can be removed successfully.

The above steps take 3 iterations over the pending list and scales
linearly.

Ticket:2656351
Reviewed By:CCR-11575
Testing Done:

Broken:

config:
router bgp 5544
 neighbor PG1 peer-group
 neighbor PG1 remote-as external
 neighbor swp10 interface peer-group PG1
 neighbor swp10 timers 3 9

failed frr-reload log:
2021-05-17 22:02:42,608  INFO: Executed "router bgp 5544  no neighbor
PG1 peer-group"
2021-05-17 22:02:42,708  INFO: Failed to execute router bgp 5544  no
neighbor PG1 remote-as external
2021-05-17 22:02:42,808  INFO: Failed to execute router bgp 5544  no
neighbor PG1 remote-as
2021-05-17 22:02:42,906  INFO: Failed to execute router bgp 5544  no
neighbor PG1
2021-05-17 22:02:43,007  INFO: Failed to execute router bgp 5544  no
neighbor
2021-05-17 22:02:43,106  INFO: Failed to execute router bgp 5544  no
2021-05-17 22:02:43,106 ERROR: "router bgp 5544 --  no" we failed to
remove this command
2021-05-17 22:02:43,107 ERROR: % Create the peer-group or interface
first

With fix:
2021-05-17 22:05:27,687  INFO: Executed "router bgp 5544  no neighbor
PG1 remote-as external"
2021-05-17 22:05:27,791  INFO: Executed "router bgp 5544  no neighbor
PG1 peer-group"

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2021-05-24 16:06:24 -07:00
.github .github: improve bug report template 2020-10-20 16:12:03 -04:00
alpine alpine: add missing libelf-dev dependency 2021-04-16 13:02:15 -04:00
babeld babeld: Allow babeld to actually register to use distribute-list 2021-05-04 16:23:37 -04:00
bfdd lib: adapt to version 2 of libyang 2021-05-13 16:24:48 -04:00
bgpd Merge pull request #8498 from ton31337/feature/opaque_data_void_zebra 2021-05-24 07:48:02 -04:00
debian lib: adapt to version 2 of libyang 2021-05-13 16:24:48 -04:00
doc Merge pull request #8701 from ton31337/feature/show_ip_bgp_alias 2021-05-21 07:23:10 -04:00
docker lib: libyang2 add missed conversion 2021-05-17 22:13:59 -04:00
eigrpd lib: adapt to version 2 of libyang 2021-05-13 16:24:48 -04:00
fpm build: make builddir include path consistent 2021-04-21 15:42:33 +02:00
gdb bgpd: Convert binfo to path 2018-10-09 14:26:30 -04:00
grpc build: fix protobuf out-of-tree build 2021-04-21 11:13:25 +02:00
include nhrpd: cleaning netlink gre information 2021-04-30 10:33:18 +02:00
isisd isisd: fix missing VRF parameter 2021-05-21 20:29:13 +03:00
ldpd ldpd: make allowing broken-lsps to be installed with pop operation configurable 2021-05-03 09:02:36 -04:00
lib Merge pull request #8720 from idryzhov/fix-vrf-newline 2021-05-24 11:40:24 -04:00
m4 build: improve AX_LUA_HEADERS for crosscompile 2021-04-21 15:42:36 +02:00
mlag zebra: Do not build mlag protobuf support if version 3 is not avail 2019-12-15 09:37:51 -05:00
nhrpd Merge pull request #8237 from pguibert6WIND/nhrp_use_zebra_2 2021-05-05 07:57:04 -04:00
ospf6d ospf6d: fix address sanitizer crash 2021-05-24 08:30:26 -03:00
ospfclient *: require semicolon after FRR_DAEMON_INFO & co. 2021-03-17 06:18:39 +01:00
ospfd ospfd: "ip ospf area" command can select wrong process 2021-05-20 12:09:27 -04:00
pathd Merge pull request #8665 from volta-networks/fix_pathd_coverity 2021-05-19 14:16:00 +02:00
pbrd pbrd: fix coverity warning 2021-05-19 16:24:21 +03:00
pceplib pceplib: Clean scan-build static analyzer messages. 2021-05-05 12:11:53 +02:00
pimd Merge pull request #8671 from donaldsharp/pim_possible_crash 2021-05-21 10:16:03 -05:00
pkgsrc *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
python *: make sure config.h or zebra.h is first 2021-04-23 12:06:35 +02:00
qpb build: fix assert() use in .pb-c.c files 2021-05-03 18:48:33 +02:00
redhat lib: adapt to version 2 of libyang 2021-05-13 16:24:48 -04:00
ripd ripd: fix interface wakeup after shutdown 2021-05-17 19:34:11 +03:00
ripngd ripngd: fix interface wakeup after shutdown 2021-05-17 19:35:57 +03:00
sharpd sharpd: add v4 redistribute watching 2021-05-03 19:38:38 -04:00
snapcraft snapcraft: Update rtrlib to 0.7.0 2021-01-07 02:16:19 +01:00
staticd lib: adapt to version 2 of libyang 2021-05-13 16:24:48 -04:00
tests Merge pull request #8498 from ton31337/feature/opaque_data_void_zebra 2021-05-24 07:48:02 -04:00
tools tools: fix peer-group deletion in frr-reload 2021-05-24 16:06:24 -07:00
vrrpd lib: adapt to version 2 of libyang 2021-05-13 16:24:48 -04:00
vtysh lib: adapt to version 2 of libyang 2021-05-13 16:24:48 -04:00
watchfrr lib: adapt to version 2 of libyang 2021-05-13 16:24:48 -04:00
yang yang: fix BGP multicast prefix type 2021-05-21 07:56:01 -03:00
zebra Merge pull request #8498 from ton31337/feature/opaque_data_void_zebra 2021-05-24 07:48:02 -04:00
.clang-format lib: adapt to version 2 of libyang 2021-05-13 16:24:48 -04:00
.dir-locals.el tools: fix emacs configuration file 2019-11-04 11:45:52 -03:00
.dockerignore docker: Make docker image on CentOS 7 2019-11-26 19:29:30 +00:00
.git-blame-ignore-revs tools: Ignore mass renaming of topotests for git blame 2021-05-11 14:14:26 +03:00
.gitignore build: add pceplib test output to gitignore 2021-03-31 08:27:11 -04:00
.travis.yml lib: libyang2 add missed conversion 2021-05-17 22:13:59 -04:00
bootstrap.sh build: turn on automake warnings (& symlinks) 2021-04-21 15:42:37 +02:00
buildtest.sh config: switch a few references to say FRR 2017-07-12 11:25:33 -05:00
changelog-auto.in Revert "debian: Adjust tarsource.sh to use native debian/changelog" 2020-11-19 17:12:41 -05:00
config.version.in build: carry --with-pkg-extra-version into tarballs 2018-10-24 15:11:50 +02:00
configure.ac build: Update configure.ac to reflect new master version 2021-05-18 14:41:39 -04:00
COPYING *: make consistent & update GPLv2 file headers 2017-05-15 16:37:41 +02:00
COPYING-LGPLv2.1 build: remove LGPL v2.0, add LGPL v2.1 2016-11-15 17:19:38 +09:00
Makefile.am lib: libyang2 add missed conversion 2021-05-17 22:13:59 -04:00
README.md doc: Update Documentation to note Solaris Unsupported status 2020-09-21 10:02:20 -04:00
stamp-h.in Initial revision 2002-12-13 20:15:29 +00:00
version.h build: make builddir include path consistent 2021-04-21 15:42:33 +02:00

Icon

FRRouting

FRR is free software that implements and manages various IPv4 and IPv6 routing protocols. It runs on nearly all distributions of Linux and BSD and supports all modern CPU architectures.

FRR currently supports the following protocols:

  • BGP
  • OSPFv2
  • OSPFv3
  • RIPv1
  • RIPv2
  • RIPng
  • IS-IS
  • PIM-SM/MSDP
  • LDP
  • BFD
  • Babel
  • PBR
  • OpenFabric
  • VRRP
  • EIGRP (alpha)
  • NHRP (alpha)

Installation & Use

For source tarballs, see the releases page.

For Debian and its derivatives, use the APT repository at https://deb.frrouting.org/.

Instructions on building and installing from source for supported platforms may be found in the developer docs.

Once installed, please refer to the user guide for instructions on use.

Community

The FRRouting email list server is located here and offers the following public lists:

Topic List
Development dev@lists.frrouting.org
Users & Operators frog@lists.frrouting.org
Announcements announce@lists.frrouting.org

For chat, we currently use Slack. You can join by clicking the "Slack" link under the Participate section of our website.

Contributing

FRR maintains developer's documentation which contains the project workflow and expectations for contributors. Some technical documentation on project internals is also available.

We welcome and appreciate all contributions, no matter how small!

Security

To report security issues, please use our security mailing list:

security [at] lists.frrouting.org