> > > > + io_read_buf(b, &id, sizeof(id)); > > > > + rp = repo_byid(id); > > > > > > Can we assert(rp != NULL) here or should we error? For example, the > > > repo_id() call in roa_insert_vrps() could result in a crash otherwise. > > > > I added an assert and added an if (rp != NULL) check in roa_insert_vrps(). > > Had to remove the assert() it triggered immediatly. > > assertion "rp != NULL" failed: file main.c, line 564, function entity_process > > I think tal files have no repoid set and so this fails for at least them.
Yes. It's only TAL files (those get added via queue_add_file() where a NULL repo is passed). All others should have a valid repo. We could consider asserting that on the sender side, but that's a separate diff. Only ROAs and ASPAs are not obviously fine with a NULL rp. With the NULL check you added in roa_insert_vrps(), ROAs are ok, ASPAs only call repo_stats_inc(), so that's fine too. Long story short, I stand by my ok for your second diff (without the assert).
