Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/34112 )
Change subject: asp: Monitor SCTP_PEER_ADDR_CHANGE events to re-apply configured Primary Address ......................................................................
Patch Set 4:
(3 comments)
File src/osmo_ss7.c:
https://gerrit.osmocom.org/c/libosmo-sccp/+/34112/comment/0a30baa2_d1fc88f5 PS3, Line 1529: is
was (this is important for understanding this IMHO, another address was made primary before and here […]
Ack
https://gerrit.osmocom.org/c/libosmo-sccp/+/34112/comment/3b2bffb1_757de860 PS3, Line 1529: anoter
another
Ack
https://gerrit.osmocom.org/c/libosmo-sccp/+/34112/comment/c722b7e7_603f5642 PS3, Line 1558: }
IMHO this is hard to read, might be worth refactoring to: […]
- "return early if notif->sn_paddr_change.spc_state is not relevant": that's not really helpful here, it would only make code larger since you'd be basically doing the same comparison twice (early return, then switch).
- "figure ev_addr and compare it with primary configured in VTY": I can try to factor out a sockaddr_match() specific to this function (simply using regular osmo_sockaddr_cmp() is not enough as can be seen in current code).