Go to file
Donald Sharp 02e7a369b8 lib: Fix dependency of match types in route-map code
Route-maps contain a hash of hash's that contain the
container type name ( say community or access list or whatever )
and then it has a hash of route-maps that this maps too

Suppose you have this:

!
frr version 7.3.1
frr defaults traditional
hostname eva
log stdout
!
debug route-map
!
router bgp 239
 neighbor 192.168.161.2 remote-as external
 !
 address-family ipv4 unicast
  neighbor 192.168.161.2 route-map foo in
 exit-address-family
!
bgp community-list standard 7000:40002 permit 7000:40002
bgp community-list standard 7000:40002 permit 7000:40003
!
route-map foo deny 20
 match community 7000:40002
!
route-map foo permit 10
!
line vty
!
end

You have a community hash which has an

7000:40002 entry

This entry has a hash of routemaps that are referencing it.  In this above
example it would have `foo` as the single entry.

Given the above config if you do this:

eva# conf
eva(config)# route-map foo deny 20
eva(config-route-map)# match community 7000:4003
eva(config-route-map)#

We would expect the `7000:40002` community hash to no longer have
a reference to the `foo` routemap.  Instead we see the code doing this:

2020/12/18 13:47:12 BGP: bgpd 7.3.1 starting: vty@2605, bgp@<all>:179
2020/12/18 13:47:47 BGP: Add route-map foo
2020/12/18 13:47:47 BGP: Route-map foo add sequence 10, type: permit
2020/12/18 13:47:57 BGP: Route-map foo add sequence 20, type: deny
2020/12/18 13:48:05 BGP: Adding dependency for filter 7000:40002 in route-map foo
2020/12/18 13:48:05 BGP: route_map_print_dependency: Dependency for 7000:40002: foo
2020/12/18 13:48:41 BGP: bgp_update_receive: rcvd End-of-RIB for IPv4 Unicast from 192.168.161.2 in vrf default
2020/12/18 13:49:19 BGP: Deleting dependency for filter 7000:4003 in route-map foo
2020/12/18 13:49:19 BGP: Adding dependency for filter 7000:4003 in route-map foo
2020/12/18 13:49:19 BGP: route_map_print_dependency: Dependency for 7000:4003: foo

Note how the code attempts to remove the dependency for `7000:4003` instead of the
dependency for `7000:40002`.  Then we create a new hash for `7000:4003` and then
install the routemap name in it.

This is wrong.  We should remove the `7000:40002` dependency and then install
a dependency for `7000:4003`.

Fix the code to do the right thing.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-12-18 14:22:09 -05:00
.github .github: improve bug report template 2020-10-20 16:12:03 -04:00
alpine alpine: Remove old docker deps for alpine 2020-10-22 03:03:53 -04:00
babeld babeld: Free ifc leak 2020-11-14 21:19:42 -05:00
bfdd bfd: fix session lookup 2020-12-04 14:38:30 +03:00
bgpd bgpd: Remove awful test of strmatch + get_afi_safi_str 2020-12-17 16:49:20 -05:00
debian Revert "debian: Merge various debian changelogs in debian/changelog" 2020-11-19 17:12:42 -05:00
doc Merge pull request #7719 from mkoskar/patch-1 2020-12-16 08:46:24 -05:00
docker docker: don't fail on chown /etc/frr 2020-06-10 00:20:04 -04:00
eigrpd *: Replace s_addr check agains 0 with INADDR_ANY 2020-12-14 21:03:38 +02:00
fpm *: Replace sizeof something to sizeof(something) 2020-03-08 21:44:53 +02:00
gdb bgpd: Convert binfo to path 2018-10-09 14:26:30 -04:00
grpc lib: don't ignore error messages generated during the commit apply phase 2020-08-14 21:37:14 -03:00
include include: Update rtnetlink.h 2020-11-15 10:12:50 -05:00
isisd *: Replace s_addr check agains 0 with INADDR_ANY 2020-12-14 21:03:38 +02:00
ldpd Merge pull request #7703 from volta-networks/fix_ldpsync_remove_hello 2020-12-09 20:21:11 -05:00
lib lib: Fix dependency of match types in route-map code 2020-12-18 14:22:09 -05:00
m4 build: find all future minor versions of python3 2020-07-09 06:47:31 +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 nhrpd: fix SA warning in nhrp_interface 2020-12-08 09:10:10 -05:00
ospf6d Merge pull request #7717 from ranjanyash54/2368 2020-12-15 07:29:10 -05:00
ospfclient ospfclient: replace inet_ntoa 2020-10-22 13:41:51 -04:00
ospfd Merge pull request #7736 from ton31337/fix/s_addr_INADDR_ANY 2020-12-15 07:12:49 -05:00
pbrd *: Convert all usage of zclient_send_message to new enum 2020-11-15 15:04:52 -05:00
pimd Merge pull request #7739 from mobash-rasool/pim-fixes 2020-12-15 16:14:32 -06:00
pkgsrc *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
python *: reformat python files 2020-10-07 17:22:26 -04:00
qpb build: add LLVM bitcode targets 2020-05-05 14:39:12 +02:00
redhat redhat: include new BFD development header 2020-11-24 07:55:07 -03:00
ripd *: Replace s_addr check agains 0 with INADDR_ANY 2020-12-14 21:03:38 +02:00
ripngd *: Remove route_map_object_t from the system 2020-11-13 19:35:20 -05:00
sharpd *: Replace s_addr check agains 0 with INADDR_ANY 2020-12-14 21:03:38 +02:00
snapcraft snapcraft: Update libyang version 2020-09-10 09:13:36 -04:00
staticd Merge pull request #7478 from donaldsharp/buffer 2020-11-18 08:30:47 -05:00
tests tests: unicode to frr_unicode 2020-12-17 13:19:52 -05:00
tools Merge pull request #7582 from AnuradhaKaruppiah/frr-reload-cleanup 2020-12-07 16:19:04 -05:00
vrrpd *: Convert all usage of zclient_send_message to new enum 2020-11-15 15:04:52 -05:00
vtysh vtysh: When dry-running no need to start/end configuration 2020-12-15 15:33:17 -05:00
watchfrr *: unify thread/event cancel macros 2020-10-23 12:16:52 -04:00
yang Merge pull request #7590 from opensourcerouting/isisd-lfa 2020-12-02 20:43:51 -05:00
zebra zebra: nht resolve-via-default doesn't need force 2020-12-17 11:22:09 -05:00
.clang-format clang-format: add FOREACH_SAFI to the ForEachMacros list 2020-08-03 12:18:24 -03: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 *: Consolidate on first git blame ignore revs 2020-10-13 16:07:18 -04:00
.gitignore Revert "debian: Adjust tarsource.sh to use native debian/changelog" 2020-11-19 17:12:41 -05:00
bootstrap.sh autoreconf -i 2007-02-06 19:28:28 +00: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 Merge pull request #7162 from opensourcerouting/zebra-human-netlink 2020-12-14 14:03:35 -05: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 Revert "debian: Adjust tarsource.sh to use native debian/changelog" 2020-11-19 17:12:41 -05: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

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