[dnsdist] dnsdist using loopback address as source address for queries

Adam Bishop Adam.Bishop at jisc.ac.uk
Fri Oct 29 10:10:11 UTC 2021


On 13 Sep 2021, at 13:47, Adam Bishop <adam.bishop at jisc.ac.uk> wrote:
> On 13 Sep 2021, at 13:31, Remi Gacogne via dnsdist <dnsdist at mailman.powerdns.com> wrote:
>> That's very weird, I don't have any clue to what might be happening. Would you mind sharing the whole configuration? In particular, do you set the source interface? I would also be very interested in seeing a strace of the process while the issue is happening.
>
> Sure, I can attach strace the next time I catch it in the act. It's occurring infrequently, but reliably so might take me a few days. Source interface is not explicitly set, as the host is single homed.

Took a while to recur, but I attached trace. Nothing immediately jumps out at me, there's no errors returned by the socket.

Command used was: strace -v -s 1024 -Ff -p 1351 2>&1 | grep -v epoll_wait | grep -v nanosleep

I've left the instance in the broken state, so if there's additional testing that would be useful, please let me know.

Adam

---

[pid  1388] epoll_create(1024)          = 59
[pid  1388] socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 61
[pid  1388] epoll_ctl(59, EPOLL_CTL_ADD, 61, {EPOLLIN, {u32=61, u64=61}}) = 0
[pid  1388] epoll_ctl(59, EPOLL_CTL_DEL, 61, 0x7f15c97f0124) = 0
[pid  1388] close(61)                   = 0
[pid  1388] close(59)                   = 0
[pid  1388] epoll_create(1024)          = 59
[pid  1388] socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 61
[pid  1388] epoll_ctl(59, EPOLL_CTL_ADD, 61, {EPOLLIN, {u32=61, u64=61}}) = 0
[pid  1388] epoll_ctl(59, EPOLL_CTL_DEL, 61, 0x7f15c97f0124) = 0
[pid  1388] close(61)                   = 0
[pid  1388] close(59)                   = 0
[pid  1388] epoll_create(1024)          = 59
[pid  1388] socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 61
[pid  1388] epoll_ctl(59, EPOLL_CTL_ADD, 61, {EPOLLIN, {u32=61, u64=61}}) = 0
[pid  1388] epoll_ctl(59, EPOLL_CTL_DEL, 61, 0x7f15c97f0124) = 0
[pid  1388] close(61)                   = 0
[pid  1388] close(59)                   = 0
[pid  1384] <... recvmsg resumed>{msg_name={sa_family=AF_INET6, sin6_port=htons(40204), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "2001:630:3c:5018::197", &sin6_addr), sin6_scope_id=0}, msg_namelen=28, msg_iov=[{iov_base="\327\23\1 \0\1\0\0\0\0\0\1\4xxxx\4lbdn\4virt\2ja\3net\0\0\6\0\1\0\0)\20\0\0\0\0\0\0\0", iov_len=4368}], msg_iovlen=1, msg_control=[{cmsg_len=36, cmsg_level=SOL_IPV6, cmsg_type=0x32}], msg_controllen=40, msg_flags=0}, 0) = 50
[pid  1384] write(1, "Packet from [2001:630:3c:5018::197]:40204 for xxxx.lbdn.virt.ja.net. SOA with id 5079\n", 86) = 86
[pid  1384] sendto(11, "U\251\0 \0\1\0\0\0\0\0\1\4xxxx\4lbdn\4virt\2ja\3net\0\0\6\0\1\0\0)\20\0\0\0\0\0\0\30\0\10\0\24\0\2\200\0 \1\0060\0<P\30\0\0\0\0\0\0\1\227", 74, 0, NULL, 0) = 74
[pid  1384] recvmsg(18,  <unfinished ...>
[pid  1388] epoll_create(1024)          = 59
[pid  1388] socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 61
[pid  1388] epoll_ctl(59, EPOLL_CTL_ADD, 61, {EPOLLIN, {u32=61, u64=61}}) = 0
[pid  1388] epoll_ctl(59, EPOLL_CTL_DEL, 61, 0x7f15c97f0124) = 0
[pid  1388] close(61)                   = 0
[pid  1388] close(59)                   = 0
[pid  1382] <... recvmsg resumed>{msg_name={sa_family=AF_INET, sin_port=htons(53936), sin_addr=inet_addr("194.83.7.197")}, msg_namelen=16, msg_iov=[{iov_base="\327\23\1 \0\1\0\0\0\0\0\1\4xxxx\4lbdn\4virt\2ja\3net\0\0\6\0\1\0\0)\20\0\0\0\0\0\0\0", iov_len=4368}], msg_iovlen=1, msg_control=[{cmsg_len=28, cmsg_level=SOL_IP, cmsg_type=IP_PKTINFO, cmsg_data={ipi_ifindex=if_nametoindex("ens192"), ipi_spec_dst=inet_addr("194.83.7.197"), ipi_addr=inet_addr("194.83.7.197")}}], msg_controllen=32, msg_flags=0}, 0) = 50
[pid  1382] write(1, "Packet from 194.83.7.197:53936 for xxxx.lbdn.virt.ja.net. SOA with id 5079\n", 75) = 75
[pid  1382] sendto(11, "V\251\0 \0\1\0\0\0\0\0\1\4xxxx\4lbdn\4virt\2ja\3net\0\0\6\0\1\0\0)\20\0\0\0\0\0\0\f\0\10\0\10\0\1 \0\302S\7\305", 62, 0, NULL, 0) = 62
[pid  1382] recvmsg(4,  <unfinished ...>
[pid  1388] epoll_create(1024)          = 59
[pid  1388] socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 61
[pid  1388] epoll_ctl(59, EPOLL_CTL_ADD, 61, {EPOLLIN, {u32=61, u64=61}}) = 0
[pid  1388] epoll_ctl(59, EPOLL_CTL_DEL, 61, 0x7f15c97f0124) = 0
[pid  1388] close(61)                   = 0
[pid  1388] close(59)                   = 0
[pid  1389] <... restart_syscall resumed>) = 0
[pid  1388] epoll_create(1024)          = 59
[pid  1388] socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 61
[pid  1388] epoll_ctl(59, EPOLL_CTL_ADD, 61, {EPOLLIN, {u32=61, u64=61}}) = 0
[pid  1388] epoll_ctl(59, EPOLL_CTL_DEL, 61, 0x7f15c97f0124) = 0
[pid  1388] close(61)                   = 0
[pid  1388] close(59)                   = 0
[pid  1388] epoll_create(1024)          = 59
[pid  1388] socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 61
[pid  1388] epoll_ctl(59, EPOLL_CTL_ADD, 61, {EPOLLIN, {u32=61, u64=61}}) = 0
[pid  1388] epoll_ctl(59, EPOLL_CTL_DEL, 61, 0x7f15c97f0124) = 0
[pid  1388] close(61)                   = 0
[pid  1388] close(59)                   = 0
[pid  1388] epoll_create(1024)          = 59
[pid  1388] socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 61
[pid  1388] epoll_ctl(59, EPOLL_CTL_ADD, 61, {EPOLLIN, {u32=61, u64=61}}) = 0
[pid  1388] epoll_ctl(59, EPOLL_CTL_DEL, 61, 0x7f15c97f0124) = 0
[pid  1388] close(61)                   = 0
[pid  1388] close(59)                   = 0
[pid  1388] epoll_create(1024)          = 59
[pid  1388] socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 61
[pid  1388] epoll_ctl(59, EPOLL_CTL_ADD, 61, {EPOLLIN, {u32=61, u64=61}}) = 0
[pid  1388] epoll_ctl(59, EPOLL_CTL_DEL, 61, 0x7f15c97f0124) = 0
[pid  1388] close(61)                   = 0
[pid  1388] close(59)                   = 0

Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under company number. 05747339, VAT number GB 197 0632 86. Jisc’s registered office is: 4 Portwall Lane, Bristol, BS1 6NB. T 0203 697 5800.


Jisc Services Limited is a wholly owned Jisc subsidiary and a company limited by guarantee which is registered in England under company number 02881024, VAT number GB 197 0632 86. The registered office is: 4 Portwall Lane, Bristol, BS1 6NB. T 0203 697 5800.


Jisc Commercial Limited is a wholly owned Jisc subsidiary and a company limited by shares which is registered in England under company number 09316933, VAT number GB 197 0632 86. The registered office is: 4 Portwall Lane, Bristol, BS1 6NB. T 0203 697 5800.


For more details on how Jisc handles your data see our privacy notice here: https://www.jisc.ac.uk/website/privacy-notice


More information about the dnsdist mailing list