Why does named log error 22/Invalid argument quoting an IPv6 address starting with fe80: ?
  • 30 Oct 2018
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Why does named log error 22/Invalid argument quoting an IPv6 address starting with fe80: ?

  • Dark
    Light
  • PDF

Here's an example of what you might see:

01-Nov-2011 05:14:54.852 general: error: socket.c:5007: unexpected
error:
01-Nov-2011 05:14:54.852 general: error: connect
(fe80::***********#53) 22/Invalid argument

(The actual address in the example is obscured - you will see more hex characters between fe80 and #53)

When a recursive server is performing iteration - that is, it is sending queries to other authoritative servers in order to resolve client queries - it will learn the names and addresses of many other nameservers on the Internet, and store them in cache. Some of these nameservers will be advertising IPv6 addresses. For example:

f.root-servers.net.    214757    IN    AAAA    2001:500:2f::f

What has happened in the example above is that another nameserver administrator has mistakenly added their link-local IPv6 address to their nameserver configuration, and is advertising it publicly as an address on which to connect to their authoritative server.

You nameserver has learned this address, and now attempts to use it when contacting the nameserver that advertised it. Of course this is not going to be possible; link-local IPv6 addresses are not routable. 

The error can be ignored (unless you are the administrator of the nameserver that is advertising it).

To suppress any attempts by named to connect to link-local IPv6 addresses (and thus also the reporting of these errors), add to your named.conf file:

server fe80::/10 { bogus yes; };