]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: fix default-originate route-map processing
authorIgor Ryzhov <iryzhov@nfware.com>
Wed, 8 Sep 2021 18:06:44 +0000 (21:06 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Wed, 8 Sep 2021 20:37:50 +0000 (23:37 +0300)
commitbf844bac67a32941a311c9e986282f36ee58f0a5
treec589423dd5a91d9ab51f8fbdb101ffe98a778737
parentc21258471764b99e7d1a5242bb17918bd7380740
bgpd: fix default-originate route-map processing

When processing a route-map for default-originate, we actually want to
match by attributes in routes from the RIB, but set attributes in the
newly originated route. Currently, it's not the case. Instead, we
construct a dummy path combining attributes from both routes, and we end
up with multiple problems:
- match by as-path doesn't work
- communities from the matched RIB route are copied to the newly
  originated route
- we corrupt the RIB routes

To fix the issue, we should use the new route-map API that allows using
separate match/set objects.

Fixes #9584.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
bgpd/bgp_updgrp_adv.c