diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-05-09 22:28:36 +0300 | 
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-05-09 22:28:36 +0300 | 
| commit | d9083050c8b9e300b091a8591b59f0810304e509 (patch) | |
| tree | b7d20d8e23e26ea8daede1445c585b5c781a3bea /zebra/redistribute.c | |
| parent | 03d39784e7b4ec04e0c52b31d036de2fb684094e (diff) | |
Revert "bgpd: vrf route leaking, fix vrf redistribute"
This reverts commit 6b2433c63f7fd3027cea8e06ca45f85bd3eea6f2.
Diffstat (limited to 'zebra/redistribute.c')
| -rw-r--r-- | zebra/redistribute.c | 17 | 
1 files changed, 11 insertions, 6 deletions
diff --git a/zebra/redistribute.c b/zebra/redistribute.c index 7cb426359d..89f46f9c97 100644 --- a/zebra/redistribute.c +++ b/zebra/redistribute.c @@ -337,12 +337,17 @@ void zebra_redistribute_add(ZAPI_HANDLER_ARGS)  					   zvrf_id(zvrf), afi);  		}  	} else { -		if (IS_ZEBRA_DEBUG_EVENT) -			zlog_debug("%s: setting vrf %s(%u) redist bitmap", -				   __func__, VRF_LOGNAME(zvrf->vrf), -				   zvrf_id(zvrf)); -		vrf_bitmap_set(client->redist[afi][type], zvrf_id(zvrf)); -		zebra_redistribute(client, type, 0, zvrf_id(zvrf), afi); +		if (!vrf_bitmap_check(client->redist[afi][type], +				      zvrf_id(zvrf))) { +			if (IS_ZEBRA_DEBUG_EVENT) +				zlog_debug( +					"%s: setting vrf %s(%u) redist bitmap", +					__func__, VRF_LOGNAME(zvrf->vrf), +					zvrf_id(zvrf)); +			vrf_bitmap_set(client->redist[afi][type], +				       zvrf_id(zvrf)); +			zebra_redistribute(client, type, 0, zvrf_id(zvrf), afi); +		}  	}  stream_failure:  | 
