diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2021-05-04 23:10:31 +0200 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-05-14 16:12:35 +0200 |
commit | 8c6482db8ced19032101444ddb19c9c2ae04ec9d (patch) | |
tree | ca094e80dd8fc094c41cf25eeda200644a0d9fdd /isisd/isis_redist.c | |
parent | isisd: fix "default-information originate always" (diff) | |
download | frr-8c6482db8ced19032101444ddb19c9c2ae04ec9d.tar.xz frr-8c6482db8ced19032101444ddb19c9c2ae04ec9d.zip |
isisd: fix redistribution in vrf
When the redistribution is configured in non-default VRF, isisd should
redistribute routes from this VRF instead of default.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'isisd/isis_redist.c')
-rw-r--r-- | isisd/isis_redist.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/isisd/isis_redist.c b/isisd/isis_redist.c index 843df3a84..ce0f44bf7 100644 --- a/isisd/isis_redist.c +++ b/isisd/isis_redist.c @@ -56,7 +56,7 @@ static int redist_protocol(int family) return 0; } -static afi_t afi_for_redist_protocol(int protocol) +afi_t afi_for_redist_protocol(int protocol) { if (protocol == 0) return AFI_IP; @@ -350,6 +350,9 @@ static void isis_redist_update_zebra_subscriptions(struct isis *isis) int level; int protocol; + if (isis->vrf_id == VRF_UNKNOWN) + return; + char do_subscribe[REDIST_PROTOCOL_COUNT][ZEBRA_ROUTE_MAX + 1]; memset(do_subscribe, 0, sizeof(do_subscribe)); @@ -378,9 +381,11 @@ static void isis_redist_update_zebra_subscriptions(struct isis *isis) afi_t afi = afi_for_redist_protocol(protocol); if (do_subscribe[protocol][type]) - isis_zebra_redistribute_set(afi, type); + isis_zebra_redistribute_set(afi, type, + isis->vrf_id); else - isis_zebra_redistribute_unset(afi, type); + isis_zebra_redistribute_unset(afi, type, + isis->vrf_id); } } |