Attention is currently required from: pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27472 )
Change subject: Store BSCs ......................................................................
Patch Set 2:
(3 comments)
File include/osmocom/bsc_nat/bsc_nat.h:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27472/comment/b372e9af_fb935cf0 PS1, Line 43: struct llist_head bscs; /* list of struct bsc */
I think we usually would use bsc_list here, but not critical.
If it's not that important, I'd prefer to keep it as-is.
File src/osmo-bsc-nat/bsc_nat.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27472/comment/51116ae5_17d578d7 PS1, Line 94: llist_for_each_entry(bsc, &bsc_nat->bscs, list) {
This needs to be for_each_entry_safe AFAICT, otherwise you get a use-after-free.
ACK, thanks!
File src/osmo-bsc-nat/bssap.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27472/comment/9392a6ad_b766b8f7 PS1, Line 44: bsc = bsc_nat_bsc_add(g_bsc_nat, addr);
could this return null?
No, it does talloc_zero and OSMO_ASSERT on it.