diff options
| author | Tomi Salminen <tsalminen@forcepoint.com> | 2022-02-02 11:19:09 +0200 | 
|---|---|---|
| committer | Tomi Salminen <tlsalmin@gmail.com> | 2022-02-04 10:26:54 +0200 | 
| commit | d4e66f14854d1cc5bdb8b8209613fd596f8c1775 (patch) | |
| tree | ce13e251cb0c56b7e698c87bfc1806f2fe8f30d6 /ospfd/ospf_interface.c | |
| parent | cf8638ed34cb7148697fa98819235dc036c77248 (diff) | |
ospfd: Core in ospf_if_down during shutdown.
Skip marking routes as changed in ospf_if_down if there's now
new_table present, which might be the case when the instance is
being finished
The backtrace for the core was:
  raise (sig=sig@entry=11) at ../sysdeps/unix/sysv/linux/raise.c:50
  core_handler (signo=11, siginfo=0x7fffffffe170, context=<optimized out>) at lib/sigevent.c:262
  <signal handler called>
  route_top (table=0x0) at lib/table.c:401
  ospf_if_down (oi=oi@entry=0x555555999090) at ospfd/ospf_interface.c:849
  ospf_if_free (oi=0x555555999090) at ospfd/ospf_interface.c:339
  ospf_finish_final (ospf=0x55555599c830) at ospfd/ospfd.c:749
  ospf_deferred_shutdown_finish (ospf=0x55555599c830) at ospfd/ospfd.c:578
  ospf_deferred_shutdown_check (ospf=<optimized out>) at ospfd/ospfd.c:627
  ospf_finish (ospf=<optimized out>) at ospfd/ospfd.c:683
  ospf_terminate () at ospfd/ospfd.c:653
  sigint () at ospfd/ospf_main.c:109
  quagga_sigevent_process () at lib/sigevent.c:130
  thread_fetch (m=m@entry=0x5555556e45e0, fetch=fetch@entry=0x7fffffffe9b0) at lib/thread.c:1709
  frr_run (master=0x5555556e45e0) at lib/libfrr.c:1174
  main (argc=9, argv=0x7fffffffecb8) at ospfd/ospf_main.c:254
Signed-off-by: Tomi Salminen <tsalminen@forcepoint.com>
Diffstat (limited to 'ospfd/ospf_interface.c')
| -rw-r--r-- | ospfd/ospf_interface.c | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index 299e753ccf..2626cccc37 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -845,6 +845,8 @@ int ospf_if_down(struct ospf_interface *oi)  	/* Shutdown packet reception and sending */  	ospf_if_stream_unset(oi); +	if (!ospf->new_table) +		return 1;  	for (rn = route_top(ospf->new_table); rn; rn = route_next(rn)) {  		or = rn->info;  | 
