X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/93910f6a123c1a3972978c7a9134a42f38f1ac74..b3877445fa32f46d70057212cb38347ae1bf4955:/udp.c diff --git a/udp.c b/udp.c index c526765..dde73ef 100644 --- a/udp.c +++ b/udp.c @@ -397,8 +397,14 @@ static void udp_phase_hook(void *sst, uint32_t new_phase) struct udpsocks *socks=&st->socks; struct udpcommon *uc=&st->uc; int i; - for (i=0; in_socks; i++) - udp_make_socket(uc,&socks->socks[i],M_FATAL); + bool_t anydone=0; + + for (i=0; in_socks; i++) { + bool_t required=st->addr_configured + || (!anydone && i==socks->n_socks-1); + anydone += udp_make_socket(uc,&socks->socks[i], + required ? M_FATAL : M_WARNING); + } udp_socks_register(uc,socks, uc->use_proxy ? "proxy" : "socket");