mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-18 18:25:10 -05:00
if you divert all dns requests to an unbound server, this sets things up so replies to diverted udp requests come from what looks like the right IP. set_recvpktinfo() needs to be called on listening sockets so the kernel will wire up the control messages that include the original destination ip address of the packet. comm_point_create_udp_ancil() needs to be used instead of comm_point_create_udp() so it will use recvmsg with a control message buffer and process the CMSGs inside it. for IP_SENDSRCMSG to work when sending the replies to the diverted client, the listening socket also has to be set up with the SO_BINDANY sockopt. |
||
|---|---|---|
| .. | ||
| cache | ||
| authzone.c | ||
| authzone.h | ||
| listen_dnsport.c | ||
| listen_dnsport.h | ||
| localzone.c | ||
| localzone.h | ||
| mesh.c | ||
| mesh.h | ||
| modstack.c | ||
| modstack.h | ||
| outbound_list.c | ||
| outbound_list.h | ||
| outside_network.c | ||
| outside_network.h | ||
| rpz.c | ||
| rpz.h | ||
| view.c | ||
| view.h | ||