rc.newwanip, rc.newwanipv6, interface_configure() and interfaces_configure() all call ipsec_configure_do(), which is no wonder why the code can be prone to races.