diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-03-30 13:38:45 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-04-17 18:40:17 -0400 | 
| commit | 2fb7892ed19ebff651d5da3a986350659f719a17 (patch) | |
| tree | 89feff90e07dda722deeb48e769b37ba972f8f6a /pbrd/pbr_map.c | |
| parent | 4d96fd9febd9635d803105d750c883e68f2c881f (diff) | |
pbrd: Prevent attempt at re-install for several scenarios
There exists several places we attempt to re-install the
same rule.  Figure out when we need to not make an attempt
at doing anything and do it.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pbrd/pbr_map.c')
| -rw-r--r-- | pbrd/pbr_map.c | 7 | 
1 files changed, 5 insertions, 2 deletions
diff --git a/pbrd/pbr_map.c b/pbrd/pbr_map.c index ea79320a71..6931e9ad2d 100644 --- a/pbrd/pbr_map.c +++ b/pbrd/pbr_map.c @@ -541,8 +541,11 @@ void pbr_map_check(struct pbr_map_sequence *pbrms)  		       pbrms->seqno, pbrms->reason);  	} -	for (ALL_LIST_ELEMENTS_RO(pbrm->incoming, inode, pmi)) -		pbr_send_pbr_map(pbrms, pmi, install); +	for (ALL_LIST_ELEMENTS_RO(pbrm->incoming, inode, pmi)) { +		if ((install && !pbrms->installed) || +		    (!install && pbrms->installed)) +			pbr_send_pbr_map(pbrms, pmi, install); +	}  }  void pbr_map_install(struct pbr_map *pbrm)  | 
