diff options
| author | Rafael Zalamena <rzalamena@users.noreply.github.com> | 2021-07-09 07:46:11 -0300 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-09 07:46:11 -0300 | 
| commit | f45f6a22b052988a6ca3399fde66249e8b6e00cc (patch) | |
| tree | e0f50d359268df9686982040ef9ecddee92e8916 /ospf6d/ospf6_message.c | |
| parent | 3f8fcd2caa4fadeca9ecb8b432d28341d418cd2a (diff) | |
| parent | 7359e9ba71e3b9cd73ceeb231cf26d40c22dbeb8 (diff) | |
Merge pull request #8978 from kssoman/ospf_new
ospf6d : Send LSA update immediately when ospf instance is deleted
Diffstat (limited to 'ospf6d/ospf6_message.c')
| -rw-r--r-- | ospf6d/ospf6_message.c | 14 | 
1 files changed, 13 insertions, 1 deletions
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index f5b06ef2d7..1f2618ec83 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -2370,7 +2370,19 @@ static void ospf6_send_lsupdate(struct ospf6_neighbor *on,  	}  	if (oi) {  		ospf6_packet_add(oi, op); -		OSPF6_MESSAGE_WRITE_ON(oi); +		/* If ospf instance is being deleted, send the packet +		 * immediately +		 */ +		if ((oi->area == NULL) || (oi->area->ospf6 == NULL)) +			return; +		if (oi->area->ospf6->inst_shutdown) { +			if (oi->on_write_q == 0) { +				listnode_add(oi->area->ospf6->oi_write_q, oi); +				oi->on_write_q = 1; +			} +			thread_execute(master, ospf6_write, oi->area->ospf6, 0); +		} else +			OSPF6_MESSAGE_WRITE_ON(oi);  	}  }  | 
