Bug 772 - Strange work with ipv6 with nsd 4.1.3 and 4.1.9
Strange work with ipv6 with nsd 4.1.3 and 4.1.9
Status: RESOLVED FIXED
Product: NSD
Classification: Unclassified
Component: NSD Code
4.1.x
x86_64 Linux
: P5 enhancement
Assigned To: NSD team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-06-02 11:48 CEST by Sergei Mamonov
Modified: 2016-06-02 12:30 CEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Mamonov 2016-06-02 11:48:58 CEST
Hello.

We have strange problem on our ns-server.
With nsd 4.1.3 and nsd 4.1.9 on debian 8 it regular not return answer by ipv6.
With tcpdump we saw - 
tcpdump -i eth0 host 2a03:f480:1:9::4a
...
# If connection lost - 
12:01:11.008325 IP6 2a03:f480:1:9::4a.48916 > 2001:41d0:1000:149b::3.domain: 10035+ A? exapmle.com. (38)
12:01:16.007845 IP6 2a03:f480:1:9::4a.48916 > 2001:41d0:1000:149b::3.domain: 10035+ A? example.com. (38)
12:01:21.007433 IP6 2a03:f480:1:9::4a.48916 > 2001:41d0:1000:149b::3.domain: 10035+ A? example.com. (38)

# If we have answer
12:00:28.368621 IP6 2a03:f480:1:9::4a.56074 > 2001:41d0:1000:149b::3.domain: 61488+ A? example.com. (38)
12:00:33.371116 IP6 2a03:f480:1:9::4a.56074 > 2001:41d0:1000:149b::3.domain: 61488+ A? fvds.mrqwer88.spb.ru. (38)
12:00:38.373204 IP6 2a03:f480:1:9::4a.56074 > 2001:41d0:1000:149b::3.domain: 61488+ A? example.com. (38)
12:00:38.373365 IP6 2001:41d0:1000:149b::3.domain > 2a03:f480:1:9::4a.56074: 61488*- 1/4/0 A 178.63.152.139 (181)

After downgrade to nsd 4.1.2 it work good -
12:03:28.704370 IP6 2a03:f480:1:9::4a.51727 > 2001:41d0:1000:149b::3.domain: 64213+ A? example.com. (38)
12:03:28.704489 IP6 2001:41d0:1000:149b::3.domain > 2a03:f480:1:9::4a.51727: 64213*- 1/4/0 A 178.63.152.139 (181)

It have few ipv6 adress on server, but nsd listen only one.
We try reproduced problem on test container, but it not reproduced.
Have you any ideas about it?

Thanks in advance.
Comment 1 Wouter Wijngaards 2016-06-02 11:53:08 CEST
Hi Sergei,

Are you using --enable-recvmmsg ?
Are you using reuseport: yes ?
(or other socket binding options?)

I have seen these socket options to cause IPv6 failures for others.  Perhaps they are solved by upgrading your Linux kernel?

Best regards, Wouter
Comment 2 Sergei Mamonov 2016-06-02 12:08:23 CEST
> Are you using --enable-recvmmsg ?
Yes - it build with --enable-recvmmsg on 4.1.3 and 4.1.9, but 4.1.2 builded with --disable-recvmmsg .


> Are you using reuseport: yes ?
No. It not set, in 4.1.9 it must be no by default, in 4.1.3/4.1.2 it have not this option, yet.

Looks like we have problem with recvmmsg.

I rebuilded 4.1.9 with --disable-recvmmsg and now it look good too - 
13:07:02.709060 IP6 2a03:f480:1:9::4a.60311 > 2001:41d0:1000:149b::3.domain: 34279+ A? example.com. (38)
13:07:02.709249 IP6 2001:41d0:1000:149b::3.domain > 2a03:f480:1:9::4a.60311: 34279*- 1/4/0 A 178.63.152.139 (181)


Thanks a lot!
Comment 3 Wouter Wijngaards 2016-06-02 12:30:58 CEST
Hi Sergei,

Printed a warning in the ./configure --help description of recvmmsg that IPv6 has trouble on some linux kernels.

Best regards, Wouter