wahern / dns

dns.c: Single file non-blocking DNS C library without callbacks or external dependencies.
http://25thandclement.com/~william/projects/dns.c.html
MIT License
256 stars 64 forks source link

Linux doesn't like it when you reuse a udp socket from local to non-local #19

Open daurnimator opened 7 years ago

daurnimator commented 7 years ago

See https://github.com/daurnimator/lua-http/issues/73 Replicated here: https://gist.github.com/daurnimator/6765345776e87a3830ed101d1d983ee1 I've reported it to the linux kernel list: https://marc.info/?l=linux-netdev&m=148903250120465&w=2

A simple workaround seems to be calling connect() with AF_UNSPEC between other connect() calls