diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-10-23 21:28:06 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-23 21:28:06 -0400 | 
| commit | 4d347f0cb69b5ae86ec118eb6c97df976f55c782 (patch) | |
| tree | 90c805aef238f35d1bfe16558ed3dbd7fcab8d0d /ospfd/ospf_sr.c | |
| parent | 33fa4b14db658045aae0a27673d2bfdf028f7dce (diff) | |
| parent | a351b3e4d29478a9d617145f79e8594945484edc (diff) | |
Merge pull request #7380 from Orange-OpenSource/ospf-sr
Add more Segment Routing controls
Diffstat (limited to 'ospfd/ospf_sr.c')
| -rw-r--r-- | ospfd/ospf_sr.c | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c index b0b273fb23..e2218957d2 100644 --- a/ospfd/ospf_sr.c +++ b/ospfd/ospf_sr.c @@ -516,6 +516,9 @@ static int ospf_sr_start(struct ospf *ospf)  static void ospf_sr_stop(void)  { +	if (OspfSR.status == SR_OFF) +		return; +  	osr_debug("SR (%s): Stop Segment Routing", __func__);  	/* Disable any re-attempt to connect to Label Manager */ @@ -1883,7 +1886,8 @@ void ospf_sr_update_task(struct ospf *ospf)  	struct timeval start_time, stop_time; -	if (ospf == NULL) +	/* Check ospf and SR status */ +	if ((ospf == NULL) || (OspfSR.status != SR_UP))  		return;  	monotime(&start_time);  | 
