yarrick / iodine

Official git repo for iodine dns tunnel
https://code.kryo.se/iodine
ISC License
6.25k stars 507 forks source link

fix #38: responds to NS/A with IP from -n argument #39

Closed sijanec closed 4 years ago

sijanec commented 4 years ago

As described in issue #38, DNS type NS requests to iodined got responses with additional IP that was incorrect (always 2.0.0.0) if the -n argument switch was used to specify a custom IP address. The same applied to A requests (for ns.topdomain); the IP was always 2.0.0.0 because of wrong memory copying.

This commit fix solves this issue by correctly memory copying ns_ip to query destination (&q->destination).

yarrick commented 4 years ago

This does not work properly with IPv6, the destination field has changed type from in_addr_t.