You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am a little concerned that generate_udp_port doesn't check that nothing is listening on the generated port. The interface of UDP.listen always replaces an existing listener. An application that uses DNS and listens on UDP may eventually break because a dns lookup triggered generate_udp_port to generate the application port. However, with the current interface I can't see how we can do better.
I suggested: maybe as simple as providing a free_port in the interface. But indeed it may be a bit more tricky to avoid TOCTOU. Maybe there should instead be a listen that outputs a port (and allows a range being specified).
The text was updated successfully, but these errors were encountered:
@reynir mentioned in mirage/ocaml-dns#322 (review):
I suggested: maybe as simple as providing a
free_port
in the interface. But indeed it may be a bit more tricky to avoid TOCTOU. Maybe there should instead be alisten
that outputs a port (and allows a range being specified).The text was updated successfully, but these errors were encountered: